# PACKAGESITE pkg.conf or whatever



## medsdonthelp (Jul 7, 2014)

Suppressing the need to rant because it will only end with me looking like an idiot.

Have returned to testing FB FreeBSD as a virtual guest (now Win 7/VirtualBox). In a previous life the ports collection (from DVD) worked peachy. Now trying to get my head aroung pkg in a 9.2 environment. How the hell *d*o I correctly set the above? I think I've read everything so either set it in pkg.conf or in env. Specifically, I*'m* trying to get at PHP but just getting 
	
	



```
No valid repository found
```
 I confirm that variable is not set. Just completely missing the point as to what it should be set to.    :r


----------



## kpa (Jul 7, 2014)

The correct setting is now nothing, the variable is no longer used because of multi-repository support. Instead you should create a repository configuration file under /usr/local/etc/pkg/repos. For example, /usr/local/etc/pkg/repos/FreeBSD.conf with these contents:


```
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: no
}
```

You can always test which repositories are in use by running `pkg -vv`.


----------



## medsdonthelp (Jul 7, 2014)

I shall try this out, many thanks for the reply. (Subtext, was this documented anywhere @&$! where, sorry, boarding on a rant.)


----------



## medsdonthelp (Jul 23, 2014)

Blimey, still frustrated (but don't go there). More man pages to read on pkg search but this is my latest chance to re-visit since last post. Updates to follow...  :r


----------



## fonz (Jul 23, 2014)

For what it's worth, there have already been a few threads here about this very issue. However, that does not negate the observation that this change in how to specify repositories appears to have caught many people with their pants down. So communication might have been lacking somewhat, indeed.

In fact, there have been several changes to the ports infrastructure recently and although the actual changes themselves are for the better, the way they were communicated did occasionally leave something to be desired. Sorry for the inconvenience.

Edit: disclaimer: not that I was in charge of anything though, so please don't blame me


----------



## jb_fvwm2 (Jul 24, 2014)

Since earlier today when I most recently visited the forum, I was reminiscing about the days one could in a paragraph explain almost all there is about package management, being somewhat more welcoming to newbies than most any other distro (IIRC).  Accordingly, maybe there could be a port "pkg_cookbook", updated as often as the package ports, detailing (short as well as involved explanations etc.) the fifty or so most common usages and scenarios one may encounter with their usage. I further thought that maybe ports-mgmt/pkg could be coded to report upstream, optionally, on its usage (with permission) (if only for a while) so that the maintainers of such a "cookbook" could be informed of which scenarios to write about (though persons could simply grep their saved history, if any, and likewise...).


----------



## medsdonthelp (Jul 24, 2014)

I absolutely blame @fonz, he who denied it...

Hmmm, I think I've copied the code okay, `pkg -vv` is not informative, more reading then...


----------



## medsdonthelp (Aug 7, 2014)

Head still being scratched.

`pkg -vv` reports url;


```
pkg+http://pkg.FreeBSD.org/freebsd:9:x86:32:/latest
```

`pkg search php` reports nowt.

Please, before I'm slapped again about not conforming to forum rules, I promise to get VirtualBox cut and paste working at the same time which might make my life simpler.


----------



## SirDice (Aug 8, 2014)

medsdonthelp said:
			
		

> I promise to get VirtualBox cut and paste working at the same time which might make my life simpler.


Enable sshd(8) on the FreeBSD guest and use PuTTY on the Windows host to connect to it.


----------



## medsdonthelp (Aug 10, 2014)

Thank you SirDice. Short update; I'm outraged. I thought I could try the cheap and nasty route. When was telnet removed from Windows? But probably outside the scope of this forum :$ Colleagues have 'raved' about Putty, another step to try.

Some feedback on whether the URl is okay and if my use of `pkg search` is better than incompetent would be nice.


----------



## medsdonthelp (Aug 28, 2014)

Still flummoxed. `pkg -vv` shows Repositories: "blank". Would love to get virtual additions and PHP but failing. Web searches do not provide anything meaningful and I can't see a facility to search these forums across the board.

Can anyone throw me bone here?

A truly truly frustrating experience.


----------



## SirDice (Aug 29, 2014)

Did you create a custom repository entry in /usr/local/etc/pkg/repos/? If so, try removing them. If you just want the standard (official) packages you don't need to add anything. It should work "out-of-the-box".


----------



## medsdonthelp (Aug 31, 2014)

Thank you again, seems to conflict with some previous advice from a.n. other but to be double-checked...


----------



## medsdonthelp (Sep 1, 2014)

So if I go completely against @SirDice' s most recent advice I re-instate /usr/local/etc/pkg/repos/FreeBSD.conf as per previous advice.


```
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: no
}
```

Which `pkg search` gives me "No valid......"

`pkg -vv` confirms no entry.


----------



## medsdonthelp (Sep 1, 2014)

I move said file to /tmp as per @SirDice's advice and I get the same.


----------



## medsdonthelp (Sep 1, 2014)

At the risk of repeating myself I ask if there's some means of increasing verbosity anywhere?


----------



## kpa (Sep 1, 2014)

Try running `pkg update -f` and run `pkg search` again. Many users have reported that `pkg update -f` is needed to properly get pkg(8) to update the repository metadata after updating to version 1.3.7 of ports-mgmt/pkg.


----------



## medsdonthelp (Sep 2, 2014)

Ta getopt. All I can say this late in the evening is that I am (finally) getting an error msg "No address record....." which I view as progress. Dear kpa, more to checked out, thanks for the suggestion.


----------

