Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 629166 - [ideas] merge freebsd-libexec into freebsd-lib in next version, 11.1.
Summary: [ideas] merge freebsd-libexec into freebsd-lib in next version, 11.1.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal enhancement
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-28 12:30 UTC by Yuta SATOH
Modified: 2017-11-26 15:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sample patch for freebsd-sbin and freebsd-usbin ebuilds (file_629166.txt,925 bytes, patch)
2017-08-28 12:33 UTC, Yuta SATOH
Details | Diff
sample patch for freebsd-lib-11.0-r1.ebuild (file_629166.txt,6.27 KB, patch)
2017-08-28 12:36 UTC, Yuta SATOH
Details | Diff
FYI, sample patch for freebsd.eclass (file_629166.txt,927 bytes, patch)
2017-08-28 12:43 UTC, Yuta SATOH
Details | Diff
FYI, sample patch for freebsd-share-11.0.ebuild (file_629166.txt,1.60 KB, patch)
2017-08-28 12:45 UTC, Yuta SATOH
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH 2017-08-28 12:30:40 UTC
I'd like to merge freebsd-libexec into freebsd-lib in next version, 11.1.

They depend strongly on each other.
I think installing them at the same time is the safest for the following reasons.

- freebsd-libexec requires the new include files to compile but they are provided by freebsd-lib.
- A new version of -lib doesn't operate correctly if a new version of -libexec doesn't exist in your environment. (Note, the python always causes Segmentation fault.)
- When I added install_includes func (taken from -lib ebuild) to -libexec and used it with CFLAGS="-isystem ..." like -lib, it compiled successfully but the python always caused "Abort trap: 6". (please see comment #1)
- When I added the code of -libexec to -lib, it worked perfectly (compile, install and operate).

In addition,
- We can upgrade with `emerge --update` because their dependences will clear.
- We can upgrade directly from 9.1 to 11.1 without upgrading 10.3.

Please let me know your opinion.
Comment 1 Yuta SATOH 2017-08-28 12:31:46 UTC
Note,
The python couldn't run when I upgrade freebsd-libexec forcibly.

# python2.7
Python 2.7.4 (default, May 26 2013, 20:22:41)
[GCC 4.6.4] on freebsd9
Type "help", "copyright", "credits" or "license" for more information.
>>>

# emerge
python-exec: Invalid impl in /etc/python-exec/python-exec.conf: python3.3
!!! SYNC setting found in make.conf.
    This setting is Deprecated and no longer used.  Please ensure your 'sync-type' and 'sync-uri' are set correctly in /etc/portage/repos.conf/gentoo.conf
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib/python2.7/site-packages/_emerge/main.py", line 1213, in emerge_main
    action=myaction, args=myfiles, opts=myopts)
  File "/usr/lib/python2.7/site-packages/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/_emerge/actions.py", line 2423, in load_emerge_config
    **kwargs)
  File "/usr/lib/python2.7/site-packages/portage/__init__.py", line 585, in create_trees
    env=env, eprefix=eprefix)
  File "/usr/lib/python2.7/site-packages/portage/package/ebuild/config.py", line 584, in __init__
    self.packages = tuple(stack_lists(packages_list, incremental=1))
UnboundLocalError: local variable 'packages_list' referenced before assignment

# python3.2
Fatal Python error: Could not allocate TLS entry
Abort trap: 6 (core dumped)

# python3.3
Fatal Python error: Could not allocate TLS entry

Current thread 0x000000080081e270:
Abort trap: 6 (core dumped)
Comment 2 Yuta SATOH 2017-08-28 12:33:44 UTC
Created attachment 490974 [details, diff]
sample patch for freebsd-sbin and freebsd-usbin ebuilds

remove =sys-freebsd/freebsd-libexec-${RV}* from RDEPEND.
Comment 3 Yuta SATOH 2017-08-28 12:36:49 UTC
Created attachment 490978 [details, diff]
sample patch for freebsd-lib-11.0-r1.ebuild

I've tested the following cases on amd64-fbsd (gcc profile):

- Directly upgrade from available stage3.
  It doesn't contain 32-bit libraries, freebsd-lib-9.1-r2 and freebsd-libexec-9.1.
- Upgrade from latest revision of 9.1.
  It contain 32-bit libraries, freebsd-lib-9.1-r11 and freebsd-libexec-9.1-r2.
- Turn on/off USE=abi_x86_32

I've tested the following case on x86-fbsd (gcc profile):

- Directly upgrade from available stage3.
  It contain freebsd-lib-9.0-r1 and freebsd-libexec-9.0.

And, I've added a new function, bootstrap_libc, to compile itself correctly.
It will be required in the following cases:

- The 32-bit libraries don't exist in your environment.
- Upgrade it from too older version, <freebsd-lib-10.0.
- Cross compiling.

Note, I think I need to update the upgrade methods in wiki to upgrade directly.
Comment 4 Yuta SATOH 2017-08-28 12:43:29 UTC
Created attachment 490980 [details, diff]
FYI, sample patch for freebsd.eclass

If you want to upgrade from 9.x directly, this patch is required.
Comment 5 Yuta SATOH 2017-08-28 12:45:34 UTC
Created attachment 490982 [details, diff]
FYI, sample patch for freebsd-share-11.0.ebuild

If you want to upgrade from 9.x directly, this patch is required.
Comment 6 Yuta SATOH 2017-08-28 12:46:41 UTC
Before applying attached patches, freebsd-lib and freebsd-libexec are blocking each other.

# emerge -pvu freebsd-libexec freebsd-bin freebsd-lib freebsd-mk-defs freebsd-pam-modules freebsd-sbin freebsd-share freebsd-ubin freebsd-usbin freebsd-sources

These are the packages that would be merged, in order:

Calculating dependencies... done!


[ebuild     U  ] sys-freebsd/freebsd-usbin-11.0-r1::gentoo [9.1::gentoo] USE="ipv6 pam ssl -acpi -atm -audit -bluetooth -build -floppy (-kerberos) -minimal -netware -nis -profile -usb -zfs%" 0 KiB
[ebuild     U  ] sys-freebsd/freebsd-bin-11.0::gentoo [9.1::gentoo] USE="-profile" 0 KiB
[ebuild     U  ] sys-freebsd/freebsd-ubin-11.0-r1::gentoo [9.1::gentoo] USE="ipv6 ssl -ar -atm -audit -bluetooth -build (-kerberos) -netware -nis -profile -usb -zfs" ABI_X86="(32%*) (64%*) (-x32)" 0 KiB
[ebuild     U  ]  sys-freebsd/freebsd-sbin-11.0::gentoo [9.1::gentoo] USE="cxx ipv6 pf ssl -atm -build -ipfilter -netware -profile" 0 KiB
[ebuild     U  ]   sys-freebsd/freebsd-libexec-11.0::gentoo [9.1::gentoo] USE="ipv6 pam ssl (-kerberos) -nis -profile -xinetd" ABI_X86="(32%*) (64%*) (-x32)" 0 KiB
[nomerge       ] net-misc/rsync-3.0.9-r2::gentoo  USE="acl iconv ipv6 -static -xattr"
[nomerge       ]  virtual/libiconv-0-r2::gentoo  ABI_X86="(64) -32 (-x32)"
[ebuild     U  ]   sys-freebsd/freebsd-lib-11.0-r1::gentoo [9.1-r2::gentoo] USE="ipv6 ssl usb* -atm -bluetooth -build -hesiod (-kerberos) -netware -profile -zfs (-bootstrap%) (-multilib%*)" ABI_X86="(32%*) (64%*) (-x32)" 0 KiB

Total: 6 packages (6 upgrades), Size of downloads: 0 KiB

 * Error: circular dependencies:

(sys-freebsd/freebsd-lib-11.0-r1:0/0::gentoo, ebuild scheduled for merge) depends on
 (sys-freebsd/freebsd-libexec-11.0:0/0::gentoo, ebuild scheduled for merge) (buildtime)
  (sys-freebsd/freebsd-lib-11.0-r1:0/0::gentoo, ebuild scheduled for merge) (buildtime)

 * Note that circular dependencies can often be avoided by temporarily
 * disabling USE flags that trigger optional dependencies.


After applying attached patches, the dependence will be clear.

# emerge -pvu freebsd-bin freebsd-lib freebsd-mk-defs freebsd-pam-modules freebsd-sbin freebsd-share freebsd-ubin freebsd-usbin freebsd-sources

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] sys-freebsd/freebsd-mk-defs-11.0::gentoo [9.1::gentoo] USE="-profile" 0 KiB
[ebuild  NS    ] sys-freebsd/freebsd-sources-11.0-r1:0::gentoo [9.1-r1:9.1::gentoo] USE="build-kernel -debug -dtrace -profile -zfs" 0 KiB
[uninstall     ] sys-freebsd/freebsd-sources-9.1-r1:9.1::gentoo  USE="-symlink"
[blocks b      ] <sys-freebsd/freebsd-sources-9.2_beta1 ("<sys-freebsd/freebsd-sources-9.2_beta1" is blocking sys-freebsd/freebsd-sources-11.0-r1)
[ebuild     U  ] sys-freebsd/freebsd-share-11.0::gentoo [9.1::gentoo] USE="-doc -profile% -usb% -zfs%" 0 KiB
[ebuild     U  ] sys-freebsd/freebsd-pam-modules-11.0::gentoo [9.1::gentoo] USE="(-kerberos) -nis -profile" 0 KiB
[ebuild     U  ] sys-freebsd/freebsd-lib-11.0-r1::gentoo [9.1-r2::gentoo] USE="ipv6 pam%* ssl usb* -atm -bluetooth -build -hesiod (-kerberos) -netware -profile -xinetd% -zfs (-bootstrap%) (-multilib%*)" ABI_X86="(32%*) (64%*) (-x32)" 0 KiB
[uninstall     ] sys-freebsd/freebsd-libexec-9.1::gentoo  USE="ipv6 pam ssl (-kerberos) -nis -profile -xinetd"
[blocks b      ] sys-freebsd/freebsd-libexec ("sys-freebsd/freebsd-libexec" is blocking sys-freebsd/freebsd-lib-11.0-r1)
[uninstall     ] dev-libs/libelf-0.8.13-r1::gentoo  USE="nls -debug"
[blocks b      ] dev-libs/libelf ("dev-libs/libelf" is blocking sys-freebsd/freebsd-lib-11.0-r1)
[ebuild     U  ] sys-freebsd/freebsd-sbin-11.0::gentoo [9.1::gentoo] USE="cxx ipv6 pf ssl -atm -build -ipfilter -netware -profile" 0 KiB
[ebuild     U  ] sys-freebsd/freebsd-bin-11.0::gentoo [9.1::gentoo] USE="-profile" 0 KiB
[ebuild     U  ] sys-freebsd/freebsd-ubin-11.0-r1::gentoo [9.1::gentoo] USE="ipv6 ssl -ar -atm -audit -bluetooth -build (-kerberos) -netware -nis -profile -usb -zfs" ABI_X86="(32%*) (64%*) (-x32)" 0 KiB
[uninstall     ] dev-libs/libiconv-1.14-r2::gentoo  USE="-static-libs" ABI_X86="(64) -32 (-x32)"
[blocks b      ] dev-libs/libiconv ("dev-libs/libiconv" is blocking sys-freebsd/freebsd-lib-11.0-r1, sys-freebsd/freebsd-ubin-11.0-r1)
[uninstall     ] sys-freebsd/freebsd-contrib-9.1::gentoo  USE="-profile"
[blocks b      ] sys-freebsd/freebsd-contrib ("sys-freebsd/freebsd-contrib" is blocking sys-freebsd/freebsd-ubin-11.0-r1)
[ebuild     U  ] sys-freebsd/freebsd-usbin-11.0-r1::gentoo [9.1::gentoo] USE="ipv6 pam ssl -acpi -atm -audit -bluetooth -build -floppy (-kerberos) -minimal -netware -nis -profile -usb -zfs%" 0 KiB

Total: 9 packages (8 upgrades, 1 in new slot, 5 uninstalls), Size of downloads: 0 KiB
Conflict: 5 blocks
Comment 7 Alexis Ballier gentoo-dev 2017-08-28 13:04:13 UTC
(In reply to Yuta SATOH from comment #0)
> Please let me know your opinion.

I think that is definitely a good idea. Please submit a PR for merging that when it's ready. Thanks.
Comment 8 Yuta SATOH 2017-08-30 10:49:26 UTC
(In reply to Alexis Ballier from comment #7)
> (In reply to Yuta SATOH from comment #0)
> > Please let me know your opinion.
> 
> I think that is definitely a good idea. Please submit a PR for merging that
> when it's ready. Thanks.

Thanks for your reply.
I've already finished updating 11.1 ebuilds and patches from 11.0.
And, I'm testing them now.

If I don't find any critical problems, I'll open a new PR this weekend or next.
Comment 9 Yuta SATOH 2017-11-26 15:12:47 UTC
Gentoo/FreeBSD 11.1 has been merged into main tree.
Thanks aballier.

closing.