Bug#927366: salsa: --no-fail does not work as expected with update_safe

2019-04-18 Thread Raphael Hertzog
Hi,

On Thu, 18 Apr 2019, Xavier wrote:
> > $ salsa --conf-file salsa-auth.conf --conf-file +./salsa-packages.conf 
> > update_safe --all --yes --no-fail --verbose
> > [...]
> > salsa info: Error PUTing https://gitlab.com/api/v4/projects/11904256 (HTTP 
> > 400): Bad Request {"message":{"base":["Could not change HEAD: branch... at 
> > /usr/share/perl5/Devscripts/Salsa/update_repo.pm line 83.
> > $ 
> 
> Looking at code, salsa display this error because --verbose is set and
> then launch a "next" to manage next repository. Perhaps was it the last
> or is there another log after?

There's no other message after. My full log was this one:

The log looks like this:
salsa info: Found 811 projects
salsa info: zaproxy: OK
[...]
ruby-ruby-progressbar:
Default branch is kali/dev
ruby-rubydns:
bad description: 
issues_enabled should be 0
email-on-push missing
[...]
salsa info: Project ruby-ruby-progressbar => 
kalilinux/packages/ruby-ruby-progressbar
salsa info: Project ruby-rubydns => kalilinux/packages/ruby-rubydns
[...]
salsa info: Project 0trace => kalilinux/packages/0trace
salsa info: Configuring ruby-ruby-progressbar
salsa info: Email-on-push hook added to project 11904256 (recipients: 
de...@teams.kali.org dispa...@pkg.kali.org)
salsa info: Error PUTing https://gitlab.com/api/v4/projects/11904256 (HTTP 
400): Bad Request {"message":{"base":["Could not change HEAD: branch... at 
/usr/share/perl5/Devscripts/Salsa/update_repo.pm line 83.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/



Bug#927366: salsa: --no-fail does not work as expected with update_safe

2019-04-18 Thread Xavier
Le 18/04/2019 à 16:07, Raphaël Hertzog a écrit :
> Package: devscripts
> Version: 2.19.4
> Severity: normal
> User: de...@kali.org
> Usertags: origin-kali
> 
> I'm running this command:
> $ salsa --conf-file salsa-auth.conf --conf-file +./salsa-packages.conf 
> update_safe --all --yes --no-fail --verbose
> 
> salsa-auth.conf has my token and the API URL, and salsa-packages contains
> instructions to configure my package repositories:
> $ cat salsa-packages.conf 
> #SALSA_GROUP=kalilinux/packages
> SALSA_GROUP_ID=5034987
> 
> SALSA_DESC_PATTERN="%p packaging for Kali Linux"
> SALSA_DESC=yes
> 
> SALSA_EMAIL=yes
> SALSA_EMAIL_RECIPIENTS="someth...@example.net"
> 
> SALSA_SOURCE_BRANCH=master
> SALSA_DEST_BRANCH=kali/master
> SALSA_RENAME_HEAD=yes
> 
> SALSA_ENABLE_MR=yes
> SALSA_ENABLE_ISSUES=no
> 
> 
> Among all my repositories, I have some that have a "master" branch that
> needs to be renamed into "kali/master" but I also have some repositories
> that lack both "master" and "kali/master" and instead they have
> "kali/dev". The --rename-head fails on the last set of repositories but
> they are a minority so I wanted to go ahead anyway with the --no-fail.
> But despite the --no-fail, the above command failed right after the first
> error message:
> 
> $ salsa --conf-file salsa-auth.conf --conf-file +./salsa-packages.conf 
> update_safe --all --yes --no-fail --verbose
> [...]
> salsa info: Error PUTing https://gitlab.com/api/v4/projects/11904256 (HTTP 
> 400): Bad Request {"message":{"base":["Could not change HEAD: branch... at 
> /usr/share/perl5/Devscripts/Salsa/update_repo.pm line 83.
> $ 

Looking at code, salsa display this error because --verbose is set and
then launch a "next" to manage next repository. Perhaps was it the last
or is there another log after?

> Note that it seems to work with "update_repo" however:
> $ salsa --conf-file salsa-auth.conf --group-id 5034987 update_repo --no-fail 
> --all --rename-head --source-branch master --dest-branch kali/master
> You're going to configure 811 projects. Continue (N/y) y
> salsa warn: Branch rename has failed for ruby-ruby-progressbar. Use --verbose 
> to see errors
> [...]
> 
> You might find "update_safe --yes" a bit weird, but I don't want the
> noise/busy work of update_repo redoing all the configuration that hasn't
> changed...

I wrote --yes exactly for that ;-)

Cheers,
Xavier



Bug#927366: salsa: --no-fail does not work as expected with update_safe

2019-04-18 Thread Raphaël Hertzog
Package: devscripts
Version: 2.19.4
Severity: normal
User: de...@kali.org
Usertags: origin-kali

I'm running this command:
$ salsa --conf-file salsa-auth.conf --conf-file +./salsa-packages.conf 
update_safe --all --yes --no-fail --verbose

salsa-auth.conf has my token and the API URL, and salsa-packages contains
instructions to configure my package repositories:
$ cat salsa-packages.conf 
#SALSA_GROUP=kalilinux/packages
SALSA_GROUP_ID=5034987

SALSA_DESC_PATTERN="%p packaging for Kali Linux"
SALSA_DESC=yes

SALSA_EMAIL=yes
SALSA_EMAIL_RECIPIENTS="someth...@example.net"

SALSA_SOURCE_BRANCH=master
SALSA_DEST_BRANCH=kali/master
SALSA_RENAME_HEAD=yes

SALSA_ENABLE_MR=yes
SALSA_ENABLE_ISSUES=no


Among all my repositories, I have some that have a "master" branch that
needs to be renamed into "kali/master" but I also have some repositories
that lack both "master" and "kali/master" and instead they have
"kali/dev". The --rename-head fails on the last set of repositories but
they are a minority so I wanted to go ahead anyway with the --no-fail.
But despite the --no-fail, the above command failed right after the first
error message:

$ salsa --conf-file salsa-auth.conf --conf-file +./salsa-packages.conf 
update_safe --all --yes --no-fail --verbose
[...]
salsa info: Error PUTing https://gitlab.com/api/v4/projects/11904256 (HTTP 
400): Bad Request {"message":{"base":["Could not change HEAD: branch... at 
/usr/share/perl5/Devscripts/Salsa/update_repo.pm line 83.
$ 

Note that it seems to work with "update_repo" however:
$ salsa --conf-file salsa-auth.conf --group-id 5034987 update_repo --no-fail 
--all --rename-head --source-branch master --dest-branch kali/master
You're going to configure 811 projects. Continue (N/y) y
salsa warn: Branch rename has failed for ruby-ruby-progressbar. Use --verbose 
to see errors
[...]

You might find "update_safe --yes" a bit weird, but I don't want the
noise/busy work of update_repo redoing all the configuration that hasn't
changed...

Cheers,

-- Package-specific info:

--- /etc/devscripts.conf ---

--- ~/.devscripts ---
DEBRELEASE_UPLOADER=dput
DEBRELEASE_DEBS_DIR=../build-area
DEBCHANGE_RELEASE_HEURISTIC=changelog
DEBCHANGE_MULTIMAINT_MERGE=yes
DEBCHANGE_PRESERVE=yes
DEBUILD_LINTIAN_OPTS="--color always -I"
DEBSIGN_KEYID=0x3E4FB7117877F589DBCF06D6E619045DF2AC729A
DEBSIGN_PROGRAM=gpg2
DEBCHANGE_AUTO_NMU=no
DEBCOMMIT_SIGN_TAGS=yes
DEBCOMMIT_SIGN_COMMITS=yes

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 
'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-4-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages devscripts depends on:
ii  dpkg-dev  1.19.6
ii  fakeroot  1.23-1
ii  file  1:5.35-4
ii  gnupg 2.2.13-1
ii  gnupg22.2.13-1
ii  gpgv  2.2.13-1
ii  libc6 2.28-8
ii  libfile-homedir-perl  1.004-1
ii  libfile-which-perl1.23-1
ii  libipc-run-perl   20180523.0-1
ii  libmoo-perl   2.003004-2
ii  libwww-perl   6.36-1
ii  patchutils0.3.4-2
ii  perl  5.28.1-6
ii  python3   3.7.3-1
ii  sensible-utils0.0.12
ii  wdiff 1.2.2-2+b1

Versions of packages devscripts recommends:
ii  apt 1.8.0
ii  at  3.1.23-1
ii  curl7.64.0-2
ii  dctrl-tools 2.24-3
ii  debian-keyring  2019.03.24
ii  dput1.0.3
ii  equivs  2.2.0
ii  libdistro-info-perl 0.21
ii  libdpkg-perl1.19.6
ii  libencode-locale-perl   1.05-1
ii  libgit-wrapper-perl 0.048-1
ii  libgitlab-api-v4-perl   0.16-1
ii  liblist-compare-perl0.53-1
ii  liblwp-protocol-https-perl  6.07-2
ii  libsoap-lite-perl   1.27-1
ii  libstring-shellquote-perl   1.04-1
ii  libtry-tiny-perl0.30-1
ii  liburi-perl 1.76-1
ii  licensecheck3.0.31-3
ii  lintian 2.12.0
ii  man-db  2.8.5-2
ii  patch   2.7.6-3
ii  python3-apt 1.8.4
ii  python3-debian  0.1.34
ii  python3-magic   2:0.4.15-2
ii  python3-requests2.21.0-1
ii  python3-unidiff 0.5.5-1
ii  python3-xdg 0.25-5
ii  strace  4.26-0.2
ii  unzip   6.0-22
ii  wget1.20.1-1.1
ii  xz-utils5.2.4-1

Versions of packages devscripts suggests:
ii  adequate