Giter Club home page Giter Club logo

clean-chroot-manager's People

Contributors

fademind avatar graysky2 avatar inglor avatar kerberizer avatar minextu avatar rkcf avatar rpuntaie avatar taijian avatar wabuo avatar wormzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clean-chroot-manager's Issues

nuke() fails when $CHROOT64/root is a btrfs subvolume

The rm -rf command doesn't work on btrfs subvolumes.

$ sudo ccm c
[yadda yadda]
Generation complete.
$ sudo ccm n
==> Nuking the chroot...
rm: cannot remove ‘/home/myles/tmp/scratch/chroot64/root’: Operation not permitted

Requires this to delete:

btrfs subvolume delete /home/myles/tmp/scratch/chroot64/root

nice: error: Unrecognized option: '1' / deprecated use of nice -ADJUSTMENT

xxx@G6wisejackal ~/D/P/clean-chroot-manager> sudo ccm S
----> Attempting to build package...
nice: error: Unrecognized option: '1'
(yes I'm tying to build ccm in ccm, first PKGBUILD I had flying around)

I keep getting this error no matter what PKGBUILD I try and sadly have no clue how to troubleshoot this one, any tips.

cheers
Wabuo

local not used in a function

# ccm64 u

/usr/bin/ccm64: line 44: local: can only be used in a function
==> ERROR:

logname does not work in tmux for some reason. I get:

logname: no login name

Not sure why. The script works fine out of tmux.

Adding package to chroot repo... ls: cannot access *.pkg.tar.xz: No such file or directory

If custom variable PKGDEST is set in makepkg.conf file, then ccm can't find build package after build and cannot add them to installed list in chroot env:

----> Adding package to chroot repo...
ls: cannot access *.pkg.tar.xz: No such file or directory

FILES CONFIG
clean-chroot-manager.conf https://pastebin.com/raw.php?i=kkuYpGJC
makepkg.conf https://pastebin.com/raw.php?i=eW55rJM7

ISSUE LOG
https://pastebin.com/raw.php?i=Kif2hrMm

FILES

[tomasz@arch linux-firmware-git]$ la
total 28K
drwxr-xr-x 3 tomasz users 4.0K 20.11.2015 16:14 ./
drwxr-xr-x 39 tomasz users 4.0K 14.11.2015 12:56 ../
drwxr-xr-x 7 tomasz users 4.0K 04.11.2015 17:12 linux-firmware-git/
-rw-r--r-- 1 tomasz users 519 18.11.2015 22:58 .SRCINFO
-rw-r--r-- 1 tomasz users 1.4K 13.11.2015 10:21 PKGBUILD
-rw-r--r-- 1 tomasz users 386 20.11.2015 16:13 linux-firmware-git-20151111.1406ec1-1-x86_64-package.log
-rw-r--r-- 1 tomasz users 16 20.11.2015 16:13 linux-firmware-git-20151111.1406ec1-1-x86_64-pkgver.log

BUT if I made package via makepkg -src then, makepkg will create an symlink to pkg.tar.xz file in directory, where PKGBUILD is:

[tomasz@arch linux-firmware-git]$ la
total 28K
drwxr-xr-x 3 tomasz users 4.0K 20.11.2015 16:23 ./
drwxr-xr-x 39 tomasz users 4.0K 14.11.2015 12:56 ../
drwxr-xr-x 7 tomasz users 4.0K 04.11.2015 17:12 linux-firmware-git/
-rw-r--r-- 1 tomasz users 519 18.11.2015 22:58 .SRCINFO
-rw-r--r-- 1 tomasz users 1.4K 13.11.2015 10:21 PKGBUILD
lrwxrwxrwx 1 tomasz users 74 20.11.2015 16:23 linux-firmware-git-20151111.1406ec1-1-any.pkg.tar.xz -> /var/cache/pacman/aur/linux-firmware-git-20151111.1406ec1-1-any.pkg.tar.xz
[tomasz@arch linux-firmware-git]$

==> ERROR: Invalid CHROOTPATH64 defined in .config/clean-chroot-manager.conf

If using tmpfs, as you described in the man file, /scratch/.chroot64 it will be gone after a reboot.

Then ccm c returns an error, because the config file is still there.
One needs to remove the config file, which one maybe edited, to re-create the chroot folder via ccm c.

I think this should be handled by changing the fstab entry to

	tmpfs /scratch/.chroot64 tmpfs nodev,size=20G 0 0

Then this would be a doc issue (or just feedback).

Bug in devtools renders MAKELAGS broken

From a comment in the AUR:

bronek [1] added the following comment to clean-chroot-manager [2]:

@graysky many thanks for providing this package. I think it had been
broken by  change in devtools , perhaps this one
https://bugs.archlinux.org/task/44827 , which results in makechrootpkg
removing MAKEFLAGS set in root/etc/makepkg.conf . The result of this
is that THREADS set in ~/.config/clean-chroot-manager.conf is ignored.
The working workaround is hinted at in comments to #44827 , which is
to create/update ~/.makepkg.conf like this:
MAKEFLAGS='-j17'

I would suggest that, given the availability of workaround, the proper
fix would be to entirely remove THREADS from ~/.config/clean-chroot-
manager.conf and scripts, and instead advice user to create/update
~/.makepkg.conf with  MAKEFLAGS option.

Unable to build "yaourt"

Hi,

I'm unable to build "yaourt" for example. I think this script is unable to resolve depencies from the AUR.

Do you have an idea?

[root@archmedia ~] su - cr
[cr@archmedia ~]$
[cr@archmedia ~]$
[cr@archmedia ~]$ cd test/yaourt
[cr@archmedia yaourt]$ sudo ccm c
==> ERROR: Invalid CHROOTPATH defined in /root/.config/clean-chroot-manager.conf
[cr@archmedia yaourt]$ sudo mkdir -p /root/scratch/chroot64
[cr@archmedia yaourt]$ sudo ccm c
==> Creating install root at /root/scratch/chroot64/root
==> Installing packages to /root/scratch/chroot64/root
:: Synchronizing package databases...
 core                                                                                                                 106.5 KiB   498K/s 00:00 [#######################################################################################] 100%
 extra                                                                                                               1530.0 KiB  1214K/s 00:01 [#######################################################################################] 100%
 community                                                                                                           2011.4 KiB  1243K/s 00:02 [#######################################################################################] 100%
 multilib                                                                                                             108.8 KiB   508K/s 00:00 [#######################################################################################] 100%
:: There are 25 members in group base-devel:
:: Repository core
   1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file  7) findutils  8) flex  9) gawk  10) gcc  11) gettext  12) grep  13) groff  14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch  20) pkg-config  21) sed
   22) sudo  23) texinfo  24) util-linux  25) which

Enter a selection (default=all):
resolving dependencies...
looking for inter-conflicts...

Packages (87): acl-2.2.52-2  archlinux-keyring-20131027-1  attr-2.4.47-1  bash-4.2.045-5  bzip2-1.0.6-5  ca-certificates-20130906-1  cloog-0.18.1-2  coreutils-8.21-2  cracklib-2.9.0-1  curl-7.33.0-2  db-5.3.28-1  diffutils-3.3-1
               dirmngr-1.1.1-1  e2fsprogs-1.42.8-2  expat-2.1.0-3  filesystem-2013.05-2  gc-7.2.d-2  gcc-libs-4.8.2-3  gdbm-1.10-2  glib2-2.38.1-1  glibc-2.18-8  gmp-5.1.3-2  gnupg-2.0.22-1  gpgme-1.4.3-1  guile-2.0.9-1  iana-etc-2.30-3
               isl-0.12.1-2  less-458-1  libarchive-3.1.2-4  libassuan-2.1.1-1  libcap-2.22-5  libffi-3.0.13-4  libgcrypt-1.5.3-1  libgpg-error-1.12-1  libgssglue-0.4-1  libksba-1.3.0-1  libldap-2.4.36-1  libltdl-2.4.2-12
               libmpc-1.0.1-2  libsasl-2.1.26-6  libssh2-1.4.3-1  libtirpc-0.2.3-1  libunistring-0.9.3-6  linux-api-headers-3.10.6-1  lzo2-2.06-1  mpfr-3.1.2.p3-2  ncurses-5.9-6  openssl-1.0.1.e-4  pacman-mirrorlist-20130830-1
               pam-1.1.8-2  pambase-20130928-1  pcre-8.33-2  perl-5.18.1-1  pinentry-0.8.3-1  pth-2.0.7-4  readline-6.2.004-2  run-parts-4.4-1  shadow-4.1.5.1-7  tar-1.27-1  tzdata-2013h-1  xz-5.0.5-2  zlib-1.2.8-3  autoconf-2.69-1
               automake-1.14-1  binutils-2.23.2-3  bison-3.0-1  fakeroot-1.20-1  file-5.15-1  findutils-4.4.2-5  flex-2.5.37-1  gawk-4.1.0-2  gcc-4.8.2-3  gettext-0.18.3.1-2  grep-2.14-2  groff-1.22.2-5  gzip-1.6-1  libtool-2.4.2-12
               m4-1.4.17-1  make-4.0-1  pacman-4.1.2-4  patch-2.7.1-2  pkg-config-0.28-1  sed-4.2.2-3  sudo-1.8.8-1  texinfo-5.2-1  util-linux-2.24-1  which-2.20-6

Total Installed Size:   344.40 MiB

:: Proceed with installation? [Y/n]
(87/87) checking keys in keyring                                                                                                               [#######################################################################################] 100%
(87/87) checking package integrity                                                                                                             [#######################################################################################] 100%
(87/87) loading package files                                                                                                                  [#######################################################################################] 100%
(87/87) checking for file conflicts                                                                                                            [#######################################################################################] 100%
(87/87) checking available disk space                                                                                                          [#######################################################################################] 100%
( 1/87) installing linux-api-headers                                                                                                           [#######################################################################################] 100%
( 2/87) installing tzdata                                                                                                                      [#######################################################################################] 100%
( 3/87) installing iana-etc                                                                                                                    [#######################################################################################] 100%
( 4/87) installing filesystem                                                                                                                  [#######################################################################################] 100%
( 5/87) installing glibc                                                                                                                       [#######################################################################################] 100%
( 6/87) installing ncurses                                                                                                                     [#######################################################################################] 100%
( 7/87) installing readline                                                                                                                    [#######################################################################################] 100%
( 8/87) installing bash                                                                                                                        [#######################################################################################] 100%
( 9/87) installing gcc-libs                                                                                                                    [#######################################################################################] 100%
(10/87) installing gmp                                                                                                                         [#######################################################################################] 100%
(11/87) installing mpfr                                                                                                                        [#######################################################################################] 100%
(12/87) installing gawk                                                                                                                        [#######################################################################################] 100%
(13/87) installing m4                                                                                                                          [#######################################################################################] 100%
(14/87) installing diffutils                                                                                                                   [#######################################################################################] 100%
(15/87) installing autoconf                                                                                                                    [#######################################################################################] 100%
(16/87) installing gdbm                                                                                                                        [#######################################################################################] 100%
(17/87) installing db                                                                                                                          [#######################################################################################] 100%
(18/87) installing zlib                                                                                                                        [#######################################################################################] 100%
(19/87) installing cracklib                                                                                                                    [#######################################################################################] 100%
(20/87) installing libgssglue                                                                                                                  [#######################################################################################] 100%
(21/87) installing libtirpc                                                                                                                    [#######################################################################################] 100%
(22/87) installing pambase                                                                                                                     [#######################################################################################] 100%
(23/87) installing pam                                                                                                                         [#######################################################################################] 100%
(24/87) installing attr                                                                                                                        [#######################################################################################] 100%
(25/87) installing acl                                                                                                                         [#######################################################################################] 100%
(26/87) installing libcap                                                                                                                      [#######################################################################################] 100%
(27/87) installing coreutils                                                                                                                   [#######################################################################################] 100%
(28/87) installing perl                                                                                                                        [#######################################################################################] 100%
(29/87) installing automake                                                                                                                    [#######################################################################################] 100%
(30/87) installing binutils                                                                                                                    [#######################################################################################] 100%
(31/87) installing bison                                                                                                                       [#######################################################################################] 100%
(32/87) installing sed                                                                                                                         [#######################################################################################] 100%
(33/87) installing shadow                                                                                                                      [#######################################################################################] 100%
(34/87) installing util-linux                                                                                                                  [#######################################################################################] 100%
Optional dependencies for util-linux
    python: python bindings to libmount
(35/87) installing fakeroot                                                                                                                    [#######################################################################################] 100%
(36/87) installing file                                                                                                                        [#######################################################################################] 100%
(37/87) installing findutils                                                                                                                   [#######################################################################################] 100%
(38/87) installing flex                                                                                                                        [#######################################################################################] 100%
(39/87) installing libmpc                                                                                                                      [#######################################################################################] 100%
(40/87) installing isl                                                                                                                         [#######################################################################################] 100%
(41/87) installing cloog                                                                                                                       [#######################################################################################] 100%
(42/87) installing gcc                                                                                                                         [#######################################################################################] 100%
(43/87) installing pcre                                                                                                                        [#######################################################################################] 100%
(44/87) installing libffi                                                                                                                      [#######################################################################################] 100%
(45/87) installing glib2                                                                                                                       [#######################################################################################] 100%
Optional dependencies for glib2
    python2: for gdbus-codegen and gtester-report
    elfutils: gresource inspection tool
(46/87) installing libunistring                                                                                                                [#######################################################################################] 100%
(47/87) installing gettext                                                                                                                     [#######################################################################################] 100%
Optional dependencies for gettext
    cvs: for autopoint tool
(48/87) installing grep                                                                                                                        [#######################################################################################] 100%
(49/87) installing groff                                                                                                                       [#######################################################################################] 100%
Optional dependencies for groff
    netpbm: for use together with man -H command interaction in browsers
    psutils: for use together with man -H command interaction in browsers
    libxaw: for gxditview
(50/87) installing less                                                                                                                        [#######################################################################################] 100%
(51/87) installing gzip                                                                                                                        [#######################################################################################] 100%
(52/87) installing libltdl                                                                                                                     [#######################################################################################] 100%
(53/87) installing tar                                                                                                                         [#######################################################################################] 100%
(54/87) installing libtool                                                                                                                     [#######################################################################################] 100%
(55/87) installing texinfo                                                                                                                     [#######################################################################################] 100%
(56/87) installing gc                                                                                                                          [#######################################################################################] 100%
(57/87) installing guile                                                                                                                       [#######################################################################################] 100%
(58/87) installing make                                                                                                                        [#######################################################################################] 100%
(59/87) installing bzip2                                                                                                                       [#######################################################################################] 100%
(60/87) installing expat                                                                                                                       [#######################################################################################] 100%
(61/87) installing lzo2                                                                                                                        [#######################################################################################] 100%
(62/87) installing openssl                                                                                                                     [#######################################################################################] 100%
Optional dependencies for openssl
    ca-certificates [pending]
(63/87) installing xz                                                                                                                          [#######################################################################################] 100%
(64/87) installing libarchive                                                                                                                  [#######################################################################################] 100%
(65/87) installing run-parts                                                                                                                   [#######################################################################################] 100%
(66/87) installing ca-certificates                                                                                                             [#######################################################################################] 100%
(67/87) installing libssh2                                                                                                                     [#######################################################################################] 100%
(68/87) installing curl                                                                                                                        [#######################################################################################] 100%
(69/87) installing libgpg-error                                                                                                                [#######################################################################################] 100%
(70/87) installing pth                                                                                                                         [#######################################################################################] 100%
(71/87) installing libksba                                                                                                                     [#######################################################################################] 100%
(72/87) installing libgcrypt                                                                                                                   [#######################################################################################] 100%
(73/87) installing libassuan                                                                                                                   [#######################################################################################] 100%
(74/87) installing pinentry                                                                                                                    [#######################################################################################] 100%
Optional dependencies for pinentry
    gtk2: for gtk2 backend
    qt4: for qt4 backend
(75/87) installing libsasl                                                                                                                     [#######################################################################################] 100%
(76/87) installing e2fsprogs                                                                                                                   [#######################################################################################] 100%
(77/87) installing libldap                                                                                                                     [#######################################################################################] 100%
(78/87) installing dirmngr                                                                                                                     [#######################################################################################] 100%
(79/87) installing gnupg                                                                                                                       [#######################################################################################] 100%
Optional dependencies for gnupg
    curl: gpg2keys_curl [pending]
    libldap: gpg2keys_ldap [pending]
    libusb-compat: scdaemon
(80/87) installing gpgme                                                                                                                       [#######################################################################################] 100%
(81/87) installing pacman-mirrorlist                                                                                                           [#######################################################################################] 100%
(82/87) installing archlinux-keyring                                                                                                           [#######################################################################################] 100%
(83/87) installing pacman                                                                                                                      [#######################################################################################] 100%
Optional dependencies for pacman
    fakeroot: for makepkg usage as normal user [pending]
(84/87) installing patch                                                                                                                       [#######################################################################################] 100%
Optional dependencies for patch
    ed: for patch -e functionality
(85/87) installing pkg-config                                                                                                                  [#######################################################################################] 100%
(86/87) installing sudo                                                                                                                        [#######################################################################################] 100%
(87/87) installing which                                                                                                                       [#######################################################################################] 100%
Generating locales...
  en_US.UTF-8
  de_DE.UTF-8
Generation complete.
[cr@archmedia yaourt]$ sudo ccm p
clean-chroot-manager v2.20

 chroot path: /root/scratch/chroot64 (Present)
 [testing]:   Disabled
 [multilib]:  Disabled
 makeflags:   9
 use namcap:  No
[cr@archmedia yaourt]$ sudo ccm s
----> Attempting to build package...
==> Creating clean working copy [cr]...done
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
==> ERROR: /root/scratch/chroot64/cr/etc/makepkg.conf not found.
    Aborting...
==> ERROR: Could not download sources.
[cr@archmedia yaourt]$

Relative to compression

It might be interesting to add the possibility of setting the values ​​for compression in the configuration file clean-chroot-manager.conf. In this way it would be possible to simply default to things such as xz can use multithread. It's just an idea.

Custom PKGDEST set outside of chroot confuses ccm (#30 again?)

Hi!

I think I recently ran into issue #30 again, because I, too, have modified /etc/makepkg.conf to add build packages to a local repo. I saw that at the end of the discussion in #30, you added a note to the man page, warning that this would lead to problems that you consider to be out of scope.
Now, you later removed that warning again - which leads me to be confused as to what your intent here is:
a) Should ccm be able to work with a custom PKGDEST and I just misconfigured it?
b) Should it work, but is buggy?
c) Do you still consider such behaviour to be out of scope, but just accidentially removed the note about it?

Just trying to get this sorted, no pressure to implement something you consider not to be in scope!

Global "local"

Here

if [[ $? -ne 0 ]]; then
    local mesg="Cannot determine your username so exiting."
    echo -e "${RED}==> ERROR:${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" && exit 1
fi

No longer able to find local packages (for dependencies)

I use ccm to build a series of packages which depend on each other. These are my own version zfs-utils and zfs-linux (and also my own kernel packages). The way it used to work I would do:

cd zfs-utils; sudo ccm s; cd ../zfs-linux; sudo ccm s

where cd gets me, via symlinks, to appropriate directories with PKGBUILD files. Since zfs-linux has a dependency on zfs-utils which is not a standard package, the latter ccm relies on zfs-utils saved to chroot_local (and produced by the former ccm). And this used to work, but now latter ccm s fails:

==> Making package: zfs-linux 2.0.4_5.11.16.1-1 (Wed Apr 21 22:47:16 2021)
==> Retrieving sources...
  -> Found zfs-2.0.4.tar.gz
==> Validating source files with sha256sums...
    zfs-2.0.4.tar.gz ... Passed
==> Making package: zfs-linux 2.0.4_5.11.16.1-1 (Wed 21 Apr 2021 10:47:20 PM BST)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: zfs-utils=2.0.4
error: target not found: linux=5.11.16-1
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> kmod
  -> zfs-utils=2.0.4
  -> linux=5.11.16-1

I am sure the zfs-utils package is stored in the chroot_local; I confirmed it with:

% sudo repo-add chroot_local.db.tar.gz zfs-utils-2.0.4-1-x86_64.pkg.tar.zst
==> Extracting chroot_local.db.tar.gz to a temporary location...
==> Extracting chroot_local.files.tar.gz to a temporary location...
==> Adding package 'zfs-utils-2.0.4-1-x86_64.pkg.tar.zst'
==> WARNING: An entry for 'zfs-utils-2.0.4-1' already existed
  -> Computing checksums...
  -> Removing existing entry 'zfs-utils-2.0.4-1'...
  -> Creating 'desc' db entry...
  -> Creating 'files' db entry...
==> Creating updated database file 'chroot_local.db.tar.gz'

The most recent upgrades on my system (before this problem started) were:

[2021-04-17T10:01:25+0100] [ALPM] transaction started
[2021-04-17T10:01:25+0100] [ALPM] upgraded aom (3.0.0-1 -> 3.0.0-2)
[2021-04-17T10:01:25+0100] [ALPM] upgraded systemd-libs (248-4 -> 248-5)
[2021-04-17T10:01:25+0100] [ALPM] upgraded ca-certificates-mozilla (3.63-1 -> 3.64-1)
[2021-04-17T10:01:25+0100] [ALPM] upgraded fio (3.25-1 -> 3.26-1)
[2021-04-17T10:01:26+0100] [ALPM] upgraded systemd (248-4 -> 248-5)
[2021-04-17T10:01:31+0100] [ALPM] upgraded linux (5.11.14-1 -> 5.11.15-1)
[2021-04-17T10:01:38+0100] [ALPM] upgraded linux-lts (5.10.30-1 -> 5.10.31-1)
[2021-04-17T10:01:38+0100] [ALPM] upgraded nss (3.63-1 -> 3.64-1)
[2021-04-17T10:01:38+0100] [ALPM] upgraded systemd-sysvcompat (248-4 -> 248-5)
[2021-04-17T10:01:38+0100] [ALPM] upgraded vulkan-icd-loader (1.2.172-1 -> 1.2.174-2)
[2021-04-17T10:01:38+0100] [ALPM] upgraded zfs-linux (2.0.4_5.11.14.1-1 -> 2.0.4_5.11.15.1-1)
[2021-04-17T10:01:38+0100] [ALPM] upgraded zfs-linux-lts (2.0.4_5.10.30.1-1 -> 2.0.4_5.10.31.1-1)
[2021-04-17T10:01:38+0100] [ALPM] transaction completed

[2021-04-18T12:14:40+0100] [ALPM] transaction started
[2021-04-18T12:14:40+0100] [ALPM] upgraded icu (68.2-1 -> 69.1-1)
[2021-04-18T12:14:40+0100] [ALPM] upgraded boost-libs (1.75.0-2 -> 1.75.0-3)
[2021-04-18T12:14:41+0100] [ALPM] upgraded certbot (1.14.0-1 -> 1.14.0-2)
[2021-04-18T12:14:41+0100] [ALPM] upgraded harfbuzz (2.8.0-1 -> 2.8.0-3)
[2021-04-18T12:14:41+0100] [ALPM] upgraded libxml2 (2.9.10-8 -> 2.9.10-9)
[2021-04-18T12:14:41+0100] [ALPM] upgraded mtools (4.0.26-1 -> 4.0.27-1)
[2021-04-18T12:14:41+0100] [ALPM] upgraded oath-toolkit (2.6.6-1 -> 2.6.6-2)
[2021-04-18T12:14:41+0100] [ALPM] upgraded smbclient (4.14.2-1 -> 4.14.2-2)
[2021-04-18T12:14:41+0100] [ALPM] upgraded samba (4.14.2-1 -> 4.14.2-2)
[2021-04-18T12:14:41+0100] [ALPM] upgraded xfsprogs (5.11.0-1 -> 5.11.0-2)
[2021-04-18T12:14:41+0100] [ALPM] transaction completed

[2021-04-21T09:05:21+0100] [ALPM] transaction started
[2021-04-21T09:05:21+0100] [ALPM] upgraded libcups (1:2.3.3op2-2 -> 1:2.3.3op2-3)
[2021-04-21T09:05:22+0100] [ALPM] upgraded smbclient (4.14.2-2 -> 4.14.3-1)
[2021-04-21T09:05:22+0100] [ALPM] upgraded cifs-utils (6.13-1 -> 6.13-2)
[2021-04-21T09:05:22+0100] [ALPM] upgraded js78 (78.9.0-1 -> 78.10.0-1)
[2021-04-21T09:05:22+0100] [ALPM] upgraded libglvnd (1.3.2-1 -> 1.3.2-2)
[2021-04-21T09:05:22+0100] [ALPM] warning: /etc/nginx/nginx.conf installed as /etc/nginx/nginx.conf.pacnew
[2021-04-21T09:05:22+0100] [ALPM] upgraded nginx (1.18.0-2 -> 1.20.0-1)
[2021-04-21T09:05:22+0100] [ALPM] upgraded openssh (8.5p1-1 -> 8.6p1-1)
[2021-04-21T09:05:24+0100] [ALPM] upgraded plex-media-server-plexpass (1.22.2.4282-1 -> 1.22.3.4392-1)
[2021-04-21T09:05:24+0100] [ALPM] upgraded protobuf (3.15.7-1 -> 3.15.8-1)
[2021-04-21T09:05:24+0100] [ALPM] upgraded python-mock (3.0.5-5 -> 3.0.5-6)
[2021-04-21T09:05:24+0100] [ALPM] upgraded samba (4.14.2-2 -> 4.14.3-1)
[2021-04-21T09:05:25+0100] [ALPM] transaction completed

Of the above, my own builds are:

  • plex-media-server-plexpass
  • samba/smbclient
  • linux
  • linux-lts
  • zfs-utils
  • zfs-linux
  • zfs-linux-lts

Everything else coming from the official Arch repos. So far I tried, with no success:

  • sudo ccm S
  • sudo ccm n
  • pacman -U clean-chroot-manager-2.212-1-any.pkg.tar.zst (then upgraded back to 2.215-1 since the downgrade did not help)
  • manually adding [chroot_local] entry in chroot/root/etc/pacman.conf (but I do not know how to do it right, since Server=file:///repo isn't working)

This ticket is also in https://bbs.archlinux.org/viewtopic.php?pid=1968961#p1968961

--help should be usable without root

$ ccm64 --help
==> ERROR: This script must be called as root!

One can use root privileges... but isn't it better to avoid them when not needed?

Recurrent Error Message

I keep getting the following errors when using ccm more than once, so starting with the second time, in same session:

----> Updating the chroot... Failed to attach 31191 to compat systemd cgroup /user.slice/user-1000.slice/session-1.scope/payload: No such file or directory Failed to attach 31165 to compat systemd cgroup /user.slice/user-1000.slice/session-1.scope/supervisor: No such file or directory Failed to chown() cgroup /sys/fs/cgroup/systemd/user.slice/user-1000.slice/session-1.scope/payload: No such file or directory

I know this is related to this thread on the mailing list, but I have not found a definitive solution to eliminate this.

Anything I can do on my side to fix this?

Invalid CCACHE_DIR defined

$ ccm64 n
==> ERROR: Invalid CCACHE_DIR defined in ~/.config/clean-chroot-manager.conf

I don't use CCACHE at all.
tested: v2.202

Can not build packages with conflicting dependencies

If a packages has a dependency that conflicts with an already installed package the build fails. Pacman offers to replace the already installed package with the dependency but it automatically receives a no, a solution would be to automatically replace conflicting package without asking

I encountered the problem while building pam-selinux, because pambase-selinux conflicts pambase

Toggle multilib command still mentioned in README

The "Toggle Multilib" command is still listed in the README when, as far as I could tell at a quick glance, it is no longer available?

If I'm wrong about this I'll sincerely apologize and I must be doing something wrong.

a new option to pass --sign to makepkg

Rather than sign after the build, it would be nice to have an option to pass --sign to makepkg. Perhaps something along the lines:

$ tail -2 ~/.config/clean-chroot-manager.conf
# Options passed to makepkg
MAKEPKGFLAGS="--sign"

$ diff -u clean-chroot-manager64
@@ -167,9 +167,9 @@
        echo -e "${YELLOW}---->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}"

        if [[ -z "$RUNNAMCAP" ]]; then
-               makechrootpkg -c -u -r $CHROOTPATH64
+               makechrootpkg -c -u -r $CHROOTPATH64  -- $MAKEPKGFLAGS
         else
-               makechrootpkg -c -u -n -r $CHROOTPATH64
+               makechrootpkg -c -u -n -r $CHROOTPATH64 -- $MAKEPKGFLAGS
        fi

    # stop here if build fails
@@ -182,9 +182,9 @@
        echo -e "${YELLOW}---->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}"

        if [[ -z "$RUNNAMCAP" ]]; then
-               makechrootpkg -u -r $CHROOTPATH64
+               makechrootpkg -u -r $CHROOTPATH64 -- $MAKEPKGFLAGS
        else
-               makechrootpkg -u -n -r $CHROOTPATH64
+               makechrootpkg -u -n -r $CHROOTPATH64 -- $MAKEPKGFLAGS
        fi

arm support

I heavily use clean-chroot-manager for maintaining a custom shared amd64 pacman repo. But I'd like to do the same for my raspberry pis, and my pinebook. These are armv7 and aarch64 respectively, and currently ccm complains like this:

[root@pinebook ~]# ccm64 c
==> ERROR: Cannot build 64-bit packages on i686!

Have you considered making these usable on other architectures? I'm thinking it may just involving removing custom architecture detecting code.

Keep the local repos from /foo/root and /foo/$USER in sync

Pasted from a discussion in the AUR

alpha.niner commented on 2016-01-29 17:33
That seems to have done the trick!

graysky commented on 2016-01-29 00:21
I see what's wrong. Please try 2.75 which should work in either case.

alpha.niner commented on 2016-01-28 21:46 (last edited on 2016-01-28 21:54 by alpha.niner)
It works when I use 'ccm <capital es>' to build targetcli-fb-git and the second of the deps (regardless of the order I build the deps). If I don't build the second dep with <capital es> it isn't found when attempting to build t-f-g.

In my case it doesn't make sense to build the second without <capital es>. But in a case where an AUR pkg had one AUR dep, someone might build the dep with <little es> and it wouldn't be found when building the dependent pkg with <capital es>. I confirmed this by modifying the PKGBUILD of t-f-g to only require one of the two, nuked and re-created the chroot, then tried to build t-f-g with <capital es> after building the dep with <little es>. So there's no confusion, it failed because the dep I'd just built couldn't be found:

$ sudo ccm n
$ sudo ccm c
...
$ sudo ccm s
...
==> Making package: python-rtslib-fb-git 2.1.fb59-1
...
$ cd ../targetcli-fb-git
$ sudo ccm S
...
==> Installing missing dependencies...
error: target not found: python-rtslib-fb-git
==> ERROR: 'pacman' failed to install missing dependencies.
...

graysky commented on 2016-01-28 18:59
@alpha - Sounds good, thanks.

alpha.niner commented on 2016-01-28 14:33
Thanks, I'll try it out before the end of the day.

graysky commented on 2016-01-27 20:56
@alpha - Would you trying version 2.74? Please modify this PKGBUILD to that pkgver, update the sums and build. I don't want to bump formally to 2.74 until I get some feedback from you. In my test cases, it seems to solve the issue.

alpha.niner commented on 2016-01-26 21:18
As an interim solution I just modified the buildnc function to cp the necessary things from $CHROOTPATH64/root to $CHROOTPATH64/$USER. I didn't realize at first that pacman.conf may also need updating.

@@ -247,6 +247,11 @@
local mesg="Attempting to build package..."
echo -e "${YELLOW}---->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}"

+ local mesg="Updating user chroot local repo..."
+ echo -e "${YELLOW}---->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}"
+ /usr/bin/cp -a "$CHROOTPATH64/root/etc/pacman.conf" "$CHROOTPATH64/$USER/etc"
+ /usr/bin/cp -a "$CHROOTPATH64/root/repo/" "$CHROOTPATH64/$USER"
+
if [[ -z "$RUNNAMCAP" ]]; then
nice -19 $CHROOTPATH64/root/makechrootpkg-mod -u -r $CHROOTPATH64
else

graysky commented on 2016-01-26 20:44
Yes, I couldn't read the difference between s and S on my phone when I saw your original post and that error propagated... perhaps adjusting that behavior when calling with the S (capital S) option would be in order here... That would be two calls to update as I think through it thought... one to $CHROOTPATH64/root/repo and another to $CHROOTPATH64/$USER/repo or perhaps an rsync call or the like.

alpha.niner commented on 2016-01-26 20:35
I don't think it's anything to do with my PKGBULIDs.

Looking at the script (specifically clean-chroot-manager64) it seems that building packages updates the local repo at "$CHROOTPATH64/root/repo" but not "$CHROOTPATH64/$USER/repo". It's running makechrootpkg-mod with -c that causes "$USER/repo" to be 'updated', and of course -c is the "clean" flag so it's not used when makechrootpkg-mod is called in the case of 'ccm S'.
graysky commented on 2016-01-26 19:57
Not sure what to say... is there something odd in the respective PKGBUILD files for the git packages such that they wouldn't be visible as providing themselves? I cannot find any of these three in the AUR so I am assuming you modified them for your needs.
alpha.niner commented on 2016-01-26 15:25
$ sudo ccm l
==> Listing out packages in chroot repo...
-rw-r--r-- 1 root root 51K Jan 26 10:19 python-configshell-fb-git-1.1.fb19.r0.g7d537ea-1-any.pkg.tar.xz
-rw-r--r-- 1 root root 65K Jan 26 10:19 python-rtslib-fb-git-2.1.fb59.r10.g2b12785-1-any.pkg.tar.xz
$ sudo ccm S
...
error: target not found: python-rtslib-fb-git
error: target not found: python-configshell-fb-git
==> ERROR: 'pacman' failed to install missing dependencies.
==> ERROR: Build failed, check /mnt/scratch/service/build
$ ls -a /mnt/scratch/service/build
. ..
$ sudo ccm s
<success>
graysky commented on 2016-01-26 13:43
Are the packages in the local repo? What is the output of: ccm l
alpha.niner commented on 2016-01-26 05:04
When I try to build a package with 'ccm S' that depends on packages already built with ccm (also 'ccm S') the build fails:

==> Making package: targetcli-fb-git <snip>
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: python-rtslib-fb-git
error: target not found: python-configshell-fb-git
==> ERROR: 'pacman' failed to install missing dependencies.

The build succeeds when using 'ccm s'. Note the deps (and the pkg I'm building) are modified-for-git versions of AUR packages so you won't find them anywhere.

Btrfs support?

My root FS is Btrfs, and my chroot path is on / (/var/tmp/chroot64). When I attempt to create chroot, I get:

==> ERROR: BTRFS targets for building are not supported.

According to my understanding, this should have already been fixed in #40. Is this error message indicative of an unimplemented feature, or a bug?

Change between compilers

Is there a way to specify which compiler to use,besides setting CC/CXX manually in each PKGBUILD's cflags? For example have a gcc chroot and a clang chroot and use a switch to specify which on to use?

Make it possible to answer the makepkg questions interactively -suggest "i" switch

I would love if it would be possible to re enable the interactive answering of the makepkg questions eg. disable the automatic use of the default answers.

For example I want to choose jre8 and gcc-multilib here.

resolving dependencies...
:: There are 2 providers available for java-runtime:
:: Repository extra
   1) jre7-openjdk  2) jre8-openjdk

Enter a number (default=1): 
looking for conflicting packages...
:: gcc-multilib and gcc are in conflict. Remove gcc? [y/N] 
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: gcc-multilib and gcc are in conflict
==> ERROR: 'pacman' failed to install missing dependencies.

I suggest adding an i switch to re enable interactive answering.

==> ERROR: Failed to install all packages

I've just installed clean-chroot-manager-2.90-1 without issues. Now I'm trying to configure it but I get following error when I try to create a clean 64-bit chroot on my home folder:

$ sudo ccm64 c                                
==> Creating install root at /home/user/chroot/.chroot64/root
==> Installing packages to /home/user/chroot/.chroot64/root
:: Synchronizing package databases...
...
warning: ignoring package linux-api-headers-4.17.11-1
warning: cannot resolve "linux-api-headers>=4.10", a dependency of "glibc"
warning: cannot resolve "glibc", a dependency of "readline"
warning: ignoring package linux-api-headers-4.17.11-1
warning: cannot resolve "linux-api-headers>=4.10", a dependency of "glibc"
warning: cannot resolve "glibc", a dependency of "ncurses"
warning: ignoring package linux-api-headers-4.17.11-1
warning: cannot resolve "linux-api-headers>=4.10", a dependency of "glibc"
warning: cannot resolve "glibc>=2.27", a dependency of "gcc-libs"
...

==> ERROR: Failed to install packages to new root
==> ERROR: Failed to install all packages

My config file:
home/user/.config/clean-chroot-manager.conf
has this content:
CHROOTPATH64="/home/user/chroot/.chroot64"

On another machine I had:
CHROOTPATH64="/chroot/.chroot64"
but this time clean-chroot-manager complained about BTRFS with this error:

$ sudo ccm64 c 
==> ERROR: BTRFS targets for building are not supported.

EDIT:
I've removed:
linux linux-headers linux-api-headers
from
IgnorePkg
nuked chroot and recreated it without the error!

Revisiting the determination of calling user.

I'm running in to the logname: no login name issue on my install. Running zsh and the below is the results of several invocations trying to find a good response. Let me know if there's anything I can do to help, I'm just patching a way around for now off a fork.

[dschaper@europa tmp]$ echo $LOGNAME
dschaper
[dschaper@europa tmp]$ echo $USER
dschaper
[dschaper@europa tmp]$ logname
logname: no login name
[dschaper@europa tmp]$ sudo echo $LOGNAME
dschaper
[dschaper@europa tmp]$ sudo echo $USER
dschaper
[dschaper@europa tmp]$ sudo logname
logname: no login name
[dschaper@europa tmp]$ sudo echo $SUDO_USER

[dschaper@europa tmp]$ echo $SUDO_USER

[dschaper@europa tmp]$ 

Alternative to modifying makechrootpkg

I think you could avoid the need for makechrootpkg-mod by prepending PACKAGER= and MAKEFLAGS= to calls to unmodified makechrootpkg:

$ sudo makechrootpkg -c -r '/mnt/build/chroot'
...
$ grep "^PACKAGER\|^MAKEFLAGS" /mnt/build/chroot/alphaniner/etc/makepkg.conf
MAKEFLAGS='-j4'
PACKAGER='alphaniner'
$ sudo PACKAGER='a9' MAKEFLAGS='-j8' makechrootpkg -c -r '/mnt/build/chroot'
...
$ grep "^PACKAGER\|^MAKEFLAGS" /mnt/build/chroot/alphaniner/etc/makepkg.conf
MAKEFLAGS='-j8'
PACKAGER='a9'

If the variables are passed empty, makechrootpkg will behave as though they weren't passed:

$ sudo PACKAGER='' MAKEFLAGS= makechrootpkg -c -r '/mnt/build/chroot'
...
$ grep "^PACKAGER\|^MAKEFLAGS" /mnt/build/chroot/alphaniner/etc/makepkg.conf
MAKEFLAGS='-j4'
PACKAGER='alphaniner'

Proxy settings

Hello, I need to include proxy variables (http_proxy, https_proxy, etc) inside chroot in order to connect to internet. Is there a way to achieve it? Tried to place in different profile files (~/.config/clean-chroot-manager.conf, root/etc/profile, myusername/etc/profile etc) but no luck... pacman can't connect to internet.

Another way I tried was using XferCommand but wget is not in chroot by default, so it doesn't work.

Thank you!

Build multiple PKGBUILDs without cleaning chroot

Hi,

When building PKGBUILDs of the same group (eg telepathy-kde for me), I would prefer to not clean the chroot before building because they have lot of common dependencies, and take a lot of additional time to install for each package.

I optionally disabled the -c option to makechrootpkg, but in that case the local repo in the working copy does not get updated. So then I added commands to manually update the working copy repo in case -c is disabled.

The above way feels a bit of a hack. I was wondering if you can think of a better way to optionally disable clean chroot option to makechrootpkg.

My way currently: sdht0@c65454c

Thanks

makepkg is not installing makedepends

Trying to build https://aur.archlinux.org/packages/libtermkey-bzr/

I get:

==> Making package: libtermkey-bzr 0.17.r12-2 (Sun Mar 22 14:50:07 PDT 2015)
==> Retrieving sources...
-> Branching http://bazaar.leonerd.org.uk/c/libtermkey/ ...
/usr/bin/makepkg: line 468: bzr: command not found
==> ERROR: Failure while branching http://bazaar.leonerd.org.uk/c/libtermkey/
Aborting...
==> ERROR: Could not download sources.

The error does not happen when building with makepkg by itself.

Name           : clean-chroot-manager
Version        : 2.65-1
Description    : Wrapper scripts for managing clean chroots (64-bit and 32-bit).
Architecture   : any
URL            : https://github.com/graysky2/clean-chroot-manager
Licenses       : MIT
Groups         : None
Provides       : None
Depends On     : devtools
Optional Deps  : None
Required By    : None
Optional For   : None
Conflicts With : clean_chroot_manager
Replaces       : clean_chroot_manager
Installed Size :  75.00 KiB
Packager       : Jesus Alvarez <[email protected]>
Build Date     : Sun 22 Mar 2015 02:49:10 PM PDT
Install Date   : Sun 22 Mar 2015 02:49:53 PM PDT
Install Reason : Explicitly installed
Install Script : Yes
Validated By   : Signature

Adding packages to the local repo

Hi, would it be possible to add an option to add packages to the local repo managed by CCM?

My use case for this is that I use CCM (with other scripts) to keep my own local repo or packages. I don't really need to keep the chroot forever. Obviously some packages may depend on others. But if I nuke the chroot, the next time I need to rebuild one package, I would need to build all its dependancies.

By doing this, I keep the built packages elsewhere, if I need to rebuild one, I create a new chroot, then I just add the dependent packages to the local repo, and start the build of the package I need.

Hardcoded pacman.conf paths break chroot build

If I use hardcoded paths in the pacman.conf file to relocate the metadata for pacman I am unable to build a CCH clean root. I have to comment out the pacman.conf paths and let them use default.

per repo settings

What abou adding an option that the tool can be runned per repo so that the tool can be runned per config.
Like makepkg with --config option.
This would be especially nice to keep the "local" repo seperated between repos.

DISTCC_HOSTS not changed in chroot makepkg.conf

When running ccm cd an error pops up at the end of the initial package install:

sed: -e expression #2, char 37: unknown option to `s' 

The specific command at fault is the second expression of:

sed -i -e '/#DISTCC_HOSTS/ s,#,,' \
-i -e "/^DISTCC_HOSTS/ s,=\"\",=\"$DISTCC_HOSTS\"," \
-i -e '/^BUILDENV/ s,!distcc,distcc,' "$CHROOTPATH64"/root/etc/makepkg.conf

when DISTCC_HOSTS contains a string such as:
"somehost/5,lzo,cpp"

The issue being the use of ',' as a delimiter in the sed expression. As well as the separator for the options for distcc hosts.

This failure results in DISTCC_HOSTS not being set inside the chroot.

Upon changing the delimiter in this expression to a pipe '|' the issue is adverted, and DISTCC_HOSTS is set as expected. I'll open up a pull request to change the delimiter to a pipe.

Make ccm compatible with Manjaro

Enclosed is a patch to make ccm compatible with Manjaro. If you want to test it you also need to patch the Manjaro version of arch-nspawn.

There's more Manjaro functionality that could be added but this is enough to get it to work.

ccm-manjaro-patches.zip

ccm-manjaro.patch for clean-chroot-manager
manjaro-arch-nspawn.patch for Manjaro arch-nspawn
manjaropatch.sh apply patches to a live Manjaro system

allow adding packages to chroot via `ccm` (as `mkarchroot` does)

... continuing from the topic hijacking in #63

Just had Cannot find the git package needed to handle git sources.
Could pkgs in create() take up also additional parameters ($@ after shift), to install packages like git in chroot?

Many AUR packages don't take the rule serious to include make dependencies not in base-devel to makedepends. One needs to add them manually. Anyway, mkarchroot allows to add packages to chroot, so I don't see why this shouldn't be forwarded via ccm. It is no big deal for me, just a suggestion.

For now one can add packages to chroot with, e.g.:

sudo pacstrap /scratch/.chroot64/root git unzip

Nuke doesn't delete all subvolumes

The ccm nuke command doesn't take care all the subvolumes. On the xample below the ID 456 is not deleted and then 455 doesn't either.

I thought the expected behaviour is to delete all chroots and leave a clean scratch area.

$ sudo btrfs subvolume list /
ID 454 gen 121253 top level 5 path scratch/chroot64/root
ID 455 gen 121265 top level 5 path scratch/chroot64/inglor
ID 456 gen 121255 top level 455 path scratch/chroot64/inglor/var/lib/machines
$ sudo ccm64 n
==> Nuking the chroot...
inglor@tiamat ~/cowerPkg/firefox-esr$ sudo btrfs subvolume list /
ID 455 gen 121266 top level 5 path scratch/chroot64/inglor
ID 456 gen 121255 top level 455 path scratch/chroot64/inglor/var/lib/machines

Replace ls parsing

In clean-chroot-manager64 the following is used to parse out 32-bit packages when adding to the local repo:

for i in $(ls *.pkg.tar.xz | sed '/-i686.pkg.tar.xz/d'); do

A better solution would be

for i in *pkg.tar.xz; do
    [[ $i = *i686.pkg.tar.xz ]] && continue
    ...
done

Or make use of extglob:

shopt -s extglob
for i in !(*-i686.)pkg.tar.xz; do
    ...
done
shopt -u extglob

cores+1=increased compile time

Hello graysky,

I've been extensively using clean-chroot, but saw that you've added cores+1 recently which increases the compile time.

My processor have 3 cores, no HT. Those having X cores and X threads will benefit from higher cores++, but the rest like me will not. Compiled vim from abs 6 times to prove it.

for x in {1..6}; do cp -r /var/abs/extra/vim /tmp; cd /tmp/vim; sed -i "s/-j1/-j${x}/g" PKGBUILD; time makepkg --syncdeps; sudo rm -rf /tmp/vim; scrot --focused "${HOME}/scrot-${x}.png"; sudo sysctl --write vm.drop_caches=3;done

Compile time:

1 core. 10m43s , cpu load 33%
2 cores. 6m56s, cpu load 68%
3 cores. 5m38s, cpu load 100%
4. 5m40s
5. 5m42s
6. 5m44s

Cheers

"ERROR: Local repo in chroot is empty. Build something first." after successful build

Hey, I am attempting to compile firefox-kde-opensuse in a clean chroot, using clean-chroot-manager. To do that I first need to build kmozillahelper.

After configuring the clean-chroot-manager.conf and adjusting the settings everything seems to work perfectly when creating a new chroot using # ccm c. # ccm s also seems to do the compilation and packaging successfully, however after querying the chroot using # ccm l I get the following error message:

==> ERROR: Local repo in chroot is empty. Build something first.

The symlink pointing to the package file is also broken: kmozillahelper-1:0.6.4-1-x86_64.pkg.tar.xz -> /pkgdest/kmozillahelper-1:0.6.4-1-x86_64.pkg.tar.xz and I can't find any file using

find $CHROOTPATH64 -name 'kmozillahelper-1:0.6.4-1-x86_64.pkg.tar.xz'.

My clean-chroot-manager.conf looks like this:

CHROOTPATH64="/mnt/sdb1/home-data/cryzed/Various/clean-chroot-manager/chroot64"
CHROOTPATH32="/mnt/sdb1/home-data/cryzed/Various/clean-chroot-manager/chroot32"
THREADS=9
PACKAGER=""
CFLAGS="-march=native -O2 -pipe -fstack-protector-strong"
RUNNAMCAP=
RUNDISTCC=
DISTCC_THREADS=
DISTCC_HOSTS="localhost/9 foo/8 bar/4"

The last few lines from the build process output:

==> Starting package()...
Generating moc_main.cpp
[  0%] Built target kmozillahelper_automoc
Scanning dependencies of target kmozillahelper
[ 33%] Building CXX object CMakeFiles/kmozillahelper.dir/kmozillahelper_automoc.cpp.o
[ 66%] Linking CXX executable kmozillahelper
[100%] Built target kmozillahelper
Install the project...
-- Install configuration: "Release"
-- Installing: /build/kmozillahelper/pkg/kmozillahelper/usr/lib/mozilla/kmozillahelper
-- Installing: /build/kmozillahelper/pkg/kmozillahelper/usr/share/apps/kmozillahelper/kmozillahelper.notifyrc
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "kmozillahelper"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: kmozillahelper 1:0.6.4-1 (Sun Sep 18 16:41:12 CEST 2016)

Do you have any idea what I am doing wrong? if I can provide more information please let me know.

Keeps telling me "target not found" despite having done `ccm a`

It seems that the chroot_local repo isn't correctly added:

$ sudo ccm64 s
----> Attempting to build package...
==> Synchronizing chroot copy [/var/tmp/chroot/root] -> [xuanrui]...done
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
==> Making package: smlsharp 4.0.0-1 (2021年04月09日 04時29分19秒)
==> Retrieving sources...
  -> Found smlsharp-4.0.0.tar.gz
  -> Found remove-tz-test.patch
==> Validating source files with sha256sums...
    smlsharp-4.0.0.tar.gz ... Passed
    remove-tz-test.patch ... Passed
==> Making package: smlsharp 4.0.0-1 (Fri 09 Apr 2021 04:29:21 AM JST)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: massivethreads
==> ERROR: 'pacman' failed to install missing dependencies.

I do have the package added via sudo ccm64 a:

$ sudo ccm64 l
==> Listing out packages in buildroot repo...
total 216K
-rw-r--r-- 1 root root 216K  4月  9 04:29 massivethreads-1.00-1-x86_64.pkg.tar.zst

Use /usr/share/devtools makepkg configs for all archroots

I like to build with makepkg options 'strip' and 'debug', as this creates a -debug package alongside the target package (e.g. 'palemoon-26.5.0-1-x86_64.pkg.tar.xz' and 'palemoon-debug-26.5.0-1-x86_64.pkg.tar.xz'), this is easy to accomplish with CCM when building a 32-bit package, as the script uses /usr/share/devtools/makepkg-i686.conf when making the archroot, so you can just edit that file before creating the chroot.

The problem for me is that ccm64 doesn't use the devtools configs as a source, so the default makepkg flags are always used when creating a chroot. Is there a reason for this, or was it just easier to manipulate a freshly installed makepkg.conf on 64-bit chroots?

If the former, would it be possible to add a makepkg flag override to clean-chroot-manager.conf? If the latter, would it be possible to change ccm64 to use the devtools configs as a base?

Workflow for building complicated packages

This is more a question to build packages with dependencies. How do people usually build these?

----> Attempting to build package...
==> Synchronizing chroot copy [/scratch/chroot64/root] -> [inglor]...done
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
==> Making package: webkitgtk 2.4.11-11 (Thu 25 Jan 07:44:07 GMT 2018)
==> Retrieving sources...
  -> Found webkitgtk-2.4.11.tar.xz
  -> Found webkitgtk-2.4.9-abs.patch
  -> Found icu59.patch
  -> Found enchant-2.x.patch
  -> Found pkgconfig-enchant-2.patch
==> Validating source files with sha256sums...
    webkitgtk-2.4.11.tar.xz ... Passed
    webkitgtk-2.4.9-abs.patch ... Passed
    icu59.patch ... Passed
    enchant-2.x.patch ... Passed
    pkgconfig-enchant-2.patch ... Passed
==> Making package: webkitgtk 2.4.11-11 (Thu Jan 25 07:44:08 GMT 2018)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: enchant>=2.2
:: There are 2 providers available for libgl:
:: Repository extra
   1) libglvnd  2) nvidia-340xx-utils

Enter a number (default=1):
==> ERROR: 'pacman' failed to install missing dependencies.
==> ERROR: Build failed, check /scratch/chroot64/inglor/build

Does dev-tools or ccm support any way to build these packages ?

New Feature: Support custom repo location outside of chroot (picking up from #66)

Hi, it's me again!

Picking up from our conversation (mostly me babbling) on issue #66, I have a new patch that I'm using on my system and that seems to work fine, so I thought I'd just pitch it to you again, just to see if you might be interested.

It does two things:

  1. Add 2 new variables to $SKEL, allowing users to specify a custom repo location and name
  2. Adjust the code in clean-chroot-manager64.in to deal with the new variables and substitute them where appropriate in the code.

I hope this is more workable that the hacky 'solution' I came up with last year!

ccm.patch.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.