You are not logged in.

#1 2015-08-26 17:59:48

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

SOLVED: dhcpcd PKGBUILD installs files to /lib

Is /lib supposed to be owned by filesystem?

$ yaourt -Qo /lib
/lib is owned by filesystem 2015.02-1

EDIT: Yes?

Because dhcpd has a problem with that...

==> Tidying install...
  -> Purging unwanted files...
  -> Removing libtool files...
  -> Removing static library files...
  -> Compressing man and info pages...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing binaries with UPX...
==> Creating package "dhcpcd"...
  -> Generating .PKGINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: dhcpcd 6.9.2-1 (Wed Aug 26 23:17:48 JST 2015)

==> Continue installing dhcpcd ? [Y/n]
==> [v]iew package contents [c]heck package with namcap
==> ---------------------------------------------------
==> 
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) dhcpcd-6.9.2-1

Total Installed Size:  0.49 MiB
Net Upgrade Size:      0.16 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                     [####################################################################] 100%
(1/1) checking package integrity                                                                                   [####################################################################] 100%
(1/1) loading package files                                                                                        [####################################################################] 100%
(1/1) checking for file conflicts                                                                                  [####################################################################] 100%
error: failed to commit transaction (conflicting files)
dhcpcd: /lib exists in filesystem
Errors occurred, no packages were upgraded.
==> WARNING: Your packages are saved in /var/tmp/yaourt-tmp-zombie

EDIT: dhcpcd's PKGBUILD seems to be the problem; best to add "--prefix=/usr" to the configure parameters

Last edited by quequotion (2015-08-28 15:01:22)

Offline

#2 2015-08-26 18:22:14

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

http://allanmcrae.com/2014/12/pacman-4-2-released/
(see Directory Symlink Handling)

I don't know why you are building dhcpcd yourself instead of using the package from the repos, but you could compare that PKGBUILD to yours.

Offline

#3 2015-08-28 05:29:42

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

Raynman wrote:

compare that PKGBUILD to yours.

yaourt -Sbb package

builds the pkgbuild from the repo.

I -Sbb just about everything; everything can actually can be built (some packages--in the repos--cannot, for reasons such as: their source url is outdated, they haven't updated for a pacman release, a deprecated (build) dependency is no longer in the repos, etc, etc.) I have trust issues with software; if it won't build properly I don't trust it to run properly either--some software doesn't run properly even after building just fine. I build everything I can with -O3 and lto as well; lto causes build failure sometimes (always in build(always in {ld,nm,etc})) (the difference between these flags and the arch defaults is nearly irrelevant).

Looks like dhcpcd needs to not install stuff to /lib.... and all the other applications that haven't updated to the Arch standard?
I thought the intent was to implement the /lib > /usr/lib symlink in a way that was transparent for programs that don't change their policy...

Last edited by quequotion (2015-08-28 14:22:21)

Offline

#4 2015-08-28 07:47:15

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

quequotion wrote:
Raynman wrote:

compare that PKGBUILD to yours.

yaourt -Sbb package

builds the pkgbuild from the repo.

[irrelevant stuff]

Looks like dhcpcd needs to not install stuff to /lib.... and all the other applications that haven't updated to the Arch standard?
I thought the intent was to implement the /lib > /usr/lib symlink in a way that was transparent for programs that don't change their policy...

One can usually configure the directories programs use for certains types of files at compile time and if that's not possible there's a workaround. Only PKGBUILDs need(ed) to be updated. If you don't want to check your PKGBUILD (no trust issues there?), then look at the list of files in the generated package. If there are differences compared to the file list for the repo package, maybe then you want to go and try to trace that back to the PKGBUILD/yaourt.

Last edited by Raynman (2015-08-28 11:18:35)

Offline

#5 2015-08-28 11:11:17

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,969

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

If you build dhcpcd with archlinux default flags , do you get the same error ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2015-08-28 14:17:16

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

Lone_Wolf wrote:

If you build dhcpcd with archlinux default flags , do you get the same error ?

This kind of problem is not related to flags; pretend I never said anything about it.

Offline

#7 2015-08-28 14:27:55

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

Raynman wrote:

One can usually configure the directories programs use for certains types of files at compile time

This is what I mean by:

quequotion wrote:

Looks like dhcpcd needs to not install stuff to /lib.... and all the other applications that haven't updated to the Arch standard?

I've had to do this sort of thing for most of the packages in mmug-qq and other aur packages I made on my own, but dhcpcd is an officially distributed package... In theory, the packages in the repository conform to current packaging standards, yes?

check your PKGBUILD

Not my PKGBUILD, I am not now, nor have I ever been, in possession of any personalised, customized, or altered version of dhcpcd's PKGBUILD. Didn't I already say that? There is a possibility that the problem is caused by yaourt, but I'm fairly sure it's in the pkgbuild in the repo.

Last edited by quequotion (2015-08-28 14:36:31)

Offline

#8 2015-08-28 14:28:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,607

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

Works fine when built in a clean chroot. Sounds like the build system is detecting something else on your system and building/installing extra files because of it.

PKGBUILDs in the repos are meant to be built in a clean chroot, not with yaourt.

Offline

#9 2015-08-28 14:53:11

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

quequotion wrote:

check your PKGBUILD

Not my PKGBUILD, I am not now, nor have I ever been, in possession of any personalised, customized, or altered version of dhcpcd's PKGBUILD. Didn't I already say that?

Fine, I should have said "the PKGBUILD you are (or: yaourt is) using", just to make sure there's nothing strange there. But I also suggested to compare the resulting package with the one from the repo to see what ends up in /lib. The offical PKGBUILD only passes --libexecdir to the configure script and it doesn't use --libdir. Together with what Scimmia says, that might be the cause.

Last edited by Raynman (2015-08-28 14:54:44)

Offline

#10 2015-08-28 14:55:33

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

Raynman wrote:

[irrelevant stuff]

Someday, I hope that my obsessive compulsive behavior will become a contribution others will be thankful for.

For example, I've debugged dhcpcd's PKGBUILD. It had two problems:

--- PKGBUILD	2015-08-28 23:44:33.538094951 +0900
+++ PKGBUILD.qq	2015-08-28 23:44:10.217093764 +0900
@@ -27,6 +27,7 @@
 
   # configure variables
   ./configure \
+      --prefix=/usr \
       --sbindir=/usr/bin \
       --libexecdir=/usr/lib/dhcpcd \
       --dbdir=/var/lib/dhcpcd \
@@ -52,6 +53,7 @@
       >>"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 
   # Set Options in /etc/dhcpcd.conf
+  mkdir "${pkgdir}/etc"
   echo noipv4ll >> "${pkgdir}/etc/dhcpcd.conf" # Disable ip4vall
 
   # install systemd files
Scimmia wrote:

Works fine when built in a clean chroot.

Did you fix the missing "${pkgdir}/etc" before building in a clean chroot? Because that causes an additional failure in package()--which was inexplicably not a problem for yaourt.

Regarding the original problem, adding "--prefix=/usr" to the configure parameters (in the repo's pkgbuild) is the most ideal way to resolve this (libdir defaults to $PREFIX/lib; EDIT: the setting for sbindir is not default).

Last edited by quequotion (2015-08-28 16:11:12)

Offline

#11 2015-08-28 17:37:26

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

Building dhcpcd triggers build for optional dependencies (udev module) that is incorrectly installed to /lib. We need --prefix=/usr to install the library into proper location. The quequotion request is valid, thanks for reporting it. The fix has been merged to SVN.


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#12 2015-08-29 10:23:10

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

Re: SOLVED: dhcpcd PKGBUILD installs files to /lib

anatolik wrote:

The quequotion request is valid, thanks for reporting it. The fix has been merged to SVN.

Glad to be of service smile

Offline

Board footer

Powered by FluxBB