• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Install some packages from local repository

uzsolt

Well-Known Member

Thanks: 46
Messages: 251

#1
I want some packages with own options which differ from default options, and I don't want update x11-drivers/xf86-video-ati because the newest version doesn't support ClockGating, ForceLowPowerMode options (I need them, else my laptop's fan works all the time - it's a "bit" annoying). I've created a local repository and I've set up in file /usr/local/etc/pkg/repos/local.conf:
Code:
local: { url: "file:///usr/ports/packages/", mirror_type: NONE, enabled: yes }
I've disabled and re-enabled the official package repository:
/usr/local/etc/pkg/repos/FreeBSD.conf:
Code:
FreeBSD: { enabled: no }
/usr/local/etc/pkg/repos/official-freebsd.conf:
Code:
FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes }
When I run pkg version -RUl '<', it doesn't print anything (it's OK for me), but when I run pkg upgrade, it wants to upgrade xf86-video-ati from 6.14.6_4 to 7.5.0.

I think the repository annotation is right ( pkg info -A xf86-video-ati):
Code:
xf86-video-ati-6.14.6_4:
  repository : local
I can lock this package but is there any solution to prevent this upgrade?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,508
Messages: 25,688

#2
Yes, disable the FreeBSD repository completely and only use your local repository.
 

uzsolt

Well-Known Member

Thanks: 46
Messages: 251

#3
Sorry, I wasn't exact. I want some package from local repository and others from FreeBSD. Or is it impossible (yet)?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,508
Messages: 25,688

#4
I understood you perfectly well. Use one or the other, don't try to mix them. You'll quickly run into a dependency hell.
 

uzsolt

Well-Known Member

Thanks: 46
Messages: 251

#5
Ah, ok. But how can I prevent upgrading of xorg-video-ati? With pkg lock xorg-video-ati?
I think with this "disabled upgrade" I don't run into a dependency hell because nothing needs xorg-video-ati. Is it right idea?

Other packages with different options: these packages are simple, relative small programs (not libraries), for example audio/musicpd (enabled httpd, to share the best musics with "home theater" :) ), print/hplip (I've a HP scanner so I need enabled scan option, which is default disabled), deskutils/fet (disabled examples and enabled ONLYCL because I'm using it on a server too), and some other similar packages. Nothing depends on this packages.
Do you think in this case can I run into dependency hell?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,508
Messages: 25,688

#6
I would suggest setting up ports-mgmt/poudriere and build everything yourself. That way you'll have full control over the options and features while keeping the advantages of using packages. And because everything is in sync you won't run into dependency problems.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,508
Messages: 25,688

#8
Poudriere automates everything. So you just start it and a few hours later you'll have your own freshly built repository.
 

uzsolt

Well-Known Member

Thanks: 46
Messages: 251

#9
I want to skip these few hours :) I don't have a build server so I will have to build every package on my laptop.

The most important point isn't using of an own repository. I want to install and upgrade many ready-to-use packages and want some (about ten) packages with my own options (and disable upgrading of xf86-video-ati). I thought the best way is to create an own local repository with desired packages and use two repos together. Do you know a method/program?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,508
Messages: 25,688

#10
I've not tried this but the solution appears to be explained in pkg-repository(5):
Code:
WORKING WITH MULTIPLE REPOSITORIES
     Where several different repositories are configured pkg will search
     amongst them all in the order specified, unless directed to use a single
     repository by the -r flag to pkg-fetch(8), pkg-install(8),
     pkg-upgrade(8), pkg-search(8) or pkg-rquery(8).  The search order is as
     displayed in the output of

           pkg -v -v

     Where several different versions of the same package are available, pkg
     will select the one with the highest version to install or to upgrade an
     installed package to, even if a lower numbered version can be found in a
     repository earlier in the list.  This applies even if an explicit version
     is stated on the command line.  Thus if packages example-1.0.0 and
     example-1.0.1 are available in configured repositories, then

           pkg install example-1.0.0

     will actually result in example-1.0.1 being installed.  To override this
     behaviour, on first installation of the package, select the repository
     with the appropriate version:

           pkg install -r repo-a example-1.0.0

     and then to make updates to that package ``sticky'' to the same reposi-
     tory, add an annotation to the package:

           pkg annotate -A example repository repo-a
 

uzsolt

Well-Known Member

Thanks: 46
Messages: 251

#11
Yes, I tried this. The correct priority of repository was the reason why I disabled and re-enabled the FreeBSD repository.

Code:
$ pkg -v -v | sed -n '/Repositories/,/\$/p'
Repositories:
local: {
   url : "file:///usr/ports/packages/",
   enabled : yes
}
FreeBSD: {
  url : "pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/latest",
  enabled : yes,
  mirror_type : "SRV",
  signature_type : "FINGERPRINTS",
  fingerprints : "/usr/share/keys/pkg"
}
Without disable/enable the order was wrong (first is FreeBSD, second is local).
I annotated the desired packages too, as I wrote in my first comment - but it doesn't work as I expected.
 

jb_fvwm2

Daemon

Thanks: 171
Messages: 1,672

#12
I would think that if/when portmaster -P -x xf86-video-6.14.6_4 again works with the new package system, it could be a solution in this case; not knowledgeable about the portupgrade equivalent syntax but as the latter works with packages (if set up with a symlink as I've posted in another thread) already, it may work as of now. So two things to check.
 

uzsolt

Well-Known Member

Thanks: 46
Messages: 251

#13
I've an +IGNOREME in /var/db/pkg/xf86-video-6.14.6_4 so portmaster doesn't upgrade this package (and the -x option isn't needed). But for me the -P option won't work: portmaster -P firefox wants to build firefox and its dependencies.
 

Chris_H

Aspiring Daemon

Thanks: 111
Messages: 829

#14
Yes, I tried this. The correct priority of repository was the reason why I disabled and re-enabled the FreeBSD repository.

Code:
$ pkg -v -v | sed -n '/Repositories/,/\$/p'
Repositories:
local: {
   url : "file:///usr/ports/packages/",
   enabled : yes
}
FreeBSD: {
  url : "pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/latest",
  enabled : yes,
  mirror_type : "SRV",
  signature_type : "FINGERPRINTS",
  fingerprints : "/usr/share/keys/pkg"
}
Without disable/enable the order was wrong (first is FreeBSD, second is local).
I annotated the desired packages too, as I wrote in my first comment - but it doesn't work as I expected.
I know this thread is old. But the actual order is not determined by the order listed. But alphabetically.
As a result. I always prepend my preferred repos numerically. eg;
Code:
00local-repo
01local-repo
...

FreeBSD
This way any local repos get chosen first, in the order of preference. Followed by the FreeBSD repo.

HTH

--Chris