Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 481024

Summary: freebsd-sources-9.2_rc1: Please fix (R)DEPEND to allow the upgrade.
Product: Gentoo/Alt Reporter: Yuta SATOH <nigoro.dev>
Component: FreeBSDAssignee: Gentoo/BSD Team <bsd+disabled>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: FreeBSD   
URL: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: minimal patch for freebsd-sources-9.2_rc1.ebuild
sample patch for metadata.xml
very bad sample patch for freebsd-sources-9.2_rc1.ebuild

Description Yuta SATOH 2013-08-14 10:42:36 UTC
How to upgrade FreeBSD is following steps (details please see URL).

1. make buildworld
2. make buildkernel
3. make installkernel
4. Reboot
...

Since the current freebsd-sources requires same freebsd-{cddl,usbin}-${RV}, userland is replaced before you boot new kernel.

I think you need to boot new kernel before replacing the userland.


# emerge -pv freebsd-sources
[nomerge       ] sys-freebsd/freebsd-sources-9.2_rc1  USE="build-generic dtrace -profile"
[ebuild  N     ]  sys-freebsd/freebsd-cddl-9.2_rc1  USE="-build -profile" 0 kB
[ebuild  N     ]   sys-freebsd/freebsd-sources-9.2_rc1  USE="build-generic dtrace -profile" 0 kB
[ebuild     U  ] sys-freebsd/freebsd-contrib-9.2_rc1 [8.0] USE="-profile" 0 kB
[ebuild     U  ] sys-freebsd/freebsd-usbin-9.2_rc1 [8.0] USE="ipv6 pam ssl -acpi -atm -audit -bluetooth -build -floppy (-kerberos) -minimal -netware -nis -profile -usb (-isdn%) (-tcpd%*)" 0 kB
[ebuild     U  ]  sys-freebsd/freebsd-libexec-9.2_rc1 [8.0] USE="ipv6 pam ssl (-kerberos) -nis -profile -xinetd" 0 kB
[ebuild     U  ]  sys-freebsd/freebsd-ubin-9.2_rc1 [8.0] USE="ipv6 ssl -ar -atm -audit -bluetooth -build (-kerberos) -netware -nis -profile -usb -zfs" 0 kB
[ebuild     U  ]   sys-freebsd/freebsd-lib-9.2_rc1 [8.0] USE="ipv6 ssl -atm -bluetooth -build -hesiod (-kerberos) -netware -profile -usb -zfs% (-bootstrap%)" 322 kB

Total: 7 packages (5 upgrades, 2 new), Size of downloads: 322 kB

 * Error: circular dependencies:

(sys-freebsd/freebsd-cddl-9.2_rc1::gentoo, ebuild scheduled for merge) depends on
 (sys-freebsd/freebsd-sources-9.2_rc1::gentoo, ebuild scheduled for merge) (buildtime)
  (sys-freebsd/freebsd-cddl-9.2_rc1::gentoo, ebuild scheduled for merge) (buildtime)

It might be possible to break this cycle
by applying any of the following changes:
- sys-freebsd/freebsd-sources-9.2_rc1 (Change USE: -build-generic)
- sys-freebsd/freebsd-sources-9.2_rc1 (Change USE: -dtrace)
- sys-freebsd/freebsd-cddl-9.2_rc1 (Change USE: +build)
Comment 1 Yuta SATOH 2013-08-14 10:54:56 UTC
Created attachment 355974 [details, diff]
minimal patch for freebsd-sources-9.2_rc1.ebuild

This patch only supports upgrades from 9.1.
Version older than 9.1 will fail to compile.

New local USE flag, dtrace
Previous versions fails to ctfconvert (bug 479494).
When you upgrade, the successful compile you disable this flag.

e.g.)
USE="-dtrace" emerge freebsd-sources
Comment 2 Yuta SATOH 2013-08-14 10:55:27 UTC
Created attachment 355976 [details, diff]
sample patch for metadata.xml
Comment 3 Yuta SATOH 2013-08-14 11:08:08 UTC
Created attachment 355984 [details, diff]
very bad sample patch for freebsd-sources-9.2_rc1.ebuild

Compile successful on Gentoo/FreeBSD 8.0 (x86)
And I was also confirmed boot the kernel...

However, 9.0 and 8.x very old.
Do you think code is required for the upgrade ?



Prepare the include file itself, fix the following problems:

CC='i686-gentoo-freebsd8.0-gcc' make -f /var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/dev/aic7xxx/aicasm/Makefile MAKESRCPATH=/var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/dev/aic7xxx/aicasm
Warning: Object directory not changed from original /var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/i386/compile/GENERIC
yacc -b aicasm_gram  -d -o aicasm_gram.c /var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/dev/aic7xxx/aicasm/aicasm_gram.y
yacc -b aicasm_macro_gram -p mm -d -o aicasm_macro_gram.c /var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y
i686-gentoo-freebsd8.0-gcc -O2 -pipe  -I. -I/var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/dev/aic7xxx/aicasm -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign -c /var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/dev/aic7xxx/aicasm/aicasm.c
In file included from /var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/dev/aic7xxx/aicasm/aicasm.c:44:
/usr/include/sys/types.h:146: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cpumask_t'
*** Error code 1

Stop in /var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/i386/compile/GENERIC.
*** Error code 1


Prepare freebsd-lib's lib part itself, fix the following problems:

i686-gentoo-freebsd8.0-gcc -isystem /var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/include_proper -O2 -pipe  -I. -I/var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/sys/modules/aic7xxx/aicasm/../../../dev/aic7xxx/aicasm -g -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-pointer-sign  -o aicasm aicasm.o aicasm_symbol.o aicasm_gram.o aicasm_macro_gram.o aicasm_scan.o aicasm_macro_scan.o -lfl
aicasm.o: In function `__getCurrentRuneLocale':
/var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/include_proper/runetype.h:96: undefined reference to `_ThreadRuneLocale'
aicasm_symbol.o: In function `__getCurrentRuneLocale':
/var/tmp/portage/sys-freebsd/freebsd-sources-9.2_rc1/work/include_proper/runetype.h:96: undefined reference to `_ThreadRuneLocale'
collect2: ld returned 1 exit status
*** Error code 1
1 error
Comment 4 Alexis Ballier gentoo-dev 2013-08-14 17:35:04 UTC
(In reply to Yuta SATOH from comment #1)
> Created attachment 355974 [details, diff] [details, diff]
> minimal patch for freebsd-sources-9.2_rc1.ebuild
> 

applied this one, thanks


this also fixes a bigger problem: we cannot ship cddl in the stages because of the gpl/cddl incompatibility, so I've made dtrace disabled by default.


for the upgrade from 8.0, I'd say it should be recommended to install fbsd-sources with USE=-build-generic, it'd be too hacky to support this and should be the same as before.