Bug 32424

Summary: people in mga-qa-committers group cannot upload advisories
Product: Infrastructure Reporter: Marja Van Waes <marja11>
Component: OthersAssignee: Sysadmin Team <sysadmin-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: andrewsfarm, dan, davidwhodgins, j.alberto.vc, mageia, pterjan, sysadmin-bugs, tarazed25, westel
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:
Attachments: fake advisory to test committing

Description Marja Van Waes 2023-10-22 22:58:08 CEST
people in mga-qa-committers group still cannot upload advisories.

The last time this was mentioned on qa-discuss ml was here:

https://ml.mageia.org/l/arc/qa-discuss/2023-10/msg00113.html
Comment 1 Marja Van Waes 2023-10-23 16:49:29 CEST
pterjan just showed this on IRC;

https://gitweb.mageia.org/infrastructure/puppet/tree/deployment/repositories/manifests/subversion.pp

Line 9 and further show the mga-qa-committers are not in the group with acces:


    subversion::repository { '/svn/advisories':
        group        => 'mga-packagers',
        commit_mail  => ["qa-commits@ml.${::domain}"],
    }
Marja Van Waes 2023-10-23 16:49:51 CEST

CC: (none) => pterjan

Comment 2 Dave Hodgins 2023-10-23 18:31:17 CEST
http://people.mageia.org/u/davidwhodgins.html shows I have
mga-board mga-qa mga-association-members mga-iso-testers mga-qa-committers mga-council

I'm not in mga-packagers yet I have write access to two repos. One in git
(http://gitweb.mageia.org/software/copyiso2usb/) and the advisories in svn.

CC: (none) => davidwhodgins

Comment 3 Dave Hodgins 2023-10-23 18:51:04 CEST
Just to clarify. I don't know what was done to give me write access to the
advisories repo. What ever that was, that's what's missing for the
other mga-qa-committers.
Comment 4 Marja Van Waes 2023-10-23 18:51:56 CEST
Thanks, Dave,

When I was in mga-packagers-committers mga-i18n-committers mga-council mga-association-members mga-blog-moderators and mga-doc, I could upload advisories.

Two hours after being removed from mga-packagers-committers and mga-i18n-committers, and one hour after being removed from mga-doc, I could no longer upload advisories.

The original idea was to then be added to mga-qa-committers, to see whether that would let me upload them again.
Comment 5 Marja Van Waes 2023-10-23 19:48:17 CEST
In case that matters: the error I get now, when trying to upload an advisory is:


Adding         29554.adv
Transmitting file data .done
Committing transaction...
svn: E000013: Commit failed (details follow):
svn: E000013: Can't open file '/svn/advisories/db/txn-current-lock': Permission denied


And svn diff shows it is not uploaded.
Comment 6 Marja Van Waes 2023-10-24 12:05:06 CEST
Created attachment 14088 [details]
fake advisory to test committing

(In reply to Dave Hodgins from comment #3)
> Just to clarify. I don't know what was done to give me write access to the
> advisories repo. What ever that was, that's what's missing for the
> other mga-qa-committers.

Ben has now been given packager's rights on svn/advisories.

I know he hoped tarazed would get such rights before him.

Dave, would you have time to assist Ben when he tries whether committing something now works? As a test, a fake advisory would be good enough, e.g. like the one attached.
Comment 7 Marja Van Waes 2023-10-24 22:31:38 CEST
I had forgotten to CC Len and TJ, doing so now.

CC: (none) => andrewsfarm, mageia, tarazed25

Comment 8 Ben McMonagle 2023-10-25 07:36:16 CEST
I think this is where I got to last time:

from https://wiki.mageia.org/en/How_to_create_an_update_advisory =>

response from $ ssh <MageiaUsername>@svn.mageia.org :

/home/home/.ssh/config line 7: Unsupported option "compressionlevel"
/home/home/.ssh/config line 7: Unsupported option "compressionlevel"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:XS4QPoHznYxn33+RCJ9VlGz926EXnW5KZydPUA0OzmY.
Please contact your system administrator.
Add correct host key in /home/home/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/home/.ssh/known_hosts:2
RSA host key for svn.mageia.org has changed and you have requested strict checking.
Host key verification failed.

CC: (none) => westel

Comment 9 Marja Van Waes 2023-10-25 15:09:35 CEST
(In reply to Ben McMonagle from comment #8)
> I think this is where I got to last time:
> 
> from https://wiki.mageia.org/en/How_to_create_an_update_advisory =>
> 
> response from $ ssh <MageiaUsername>@svn.mageia.org :
> 

> Add correct host key in /home/home/.ssh/known_hosts to get rid of this
> message.
> Offending RSA key in /home/home/.ssh/known_hosts:2
> RSA host key for svn.mageia.org has changed and you have requested strict
> checking.
> Host key verification failed.

You can get the current host key by running:

  ssh-keyscan -t rsa svn.mageia.org

you should just replace line 2 of ~/.ssh/known_hosts with the output of that command. First make a backup or the known_hosts file ;-)
Comment 10 Dave Hodgins 2023-10-25 17:12:52 CEST
$ ssh davidwhodgins@svn.mageia.org
You tried to execute: 
Sorry, you are not allowed to execute that command.
You are member of the following groups :
mga-users mga-shell_access mga-board mga-council mga-qa mga-qa-committers mga-iso-testers
Connection to svn.mageia.org closed.

Being able to ssh into a shell session on duvel is not needed for being able
to use svn. I've never had that, yet I have svn access for adding/changing
files in svn.

The relevant entry from /home/dave/.ssh/config ...
Host svn.mageia.org
 IdentityFile /home/dave/.ssh/mageia
 Hostname svn.mageia.org
 User davidwhodgins
 Compression yes
 ServerAliveInterval 120
 ForwardX11 no
 AddressFamily inet

Using "AddressFamily inet" means I know it will only connect to the ipv4
address, so I don't have problems when I can't access ipv6 (which happens
at times), and I don't have to add the ipv6 host to the known hosts file.

The script I used to create my ssh key
$ cat setupssh 
#!/bin/bash
ssh-keygen -t rsa -b 4096 -f .ssh/$1
ssh-copy-id -i .ssh/$1.pub $USER@$1
printf "%s\n" "Add 'IdentityFile /home/$USER/.ssh/$1' to /home/$USER/.ssh/config"

I ran that as "setupssh mageia" and had a sysadmin add mageia.pub to ldap.

I manually added the key for svn.mageia.org to the known hosts file ...
$ grep svn.mageia.org .ssh/known_hosts
svn.mageia.org,212.85.158.153 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMA1ZI3P9S3T1D9hviK/1qod+nQebDIJtN1IWk8Ckwg3PhD2yHHC2UQt65Mo2OAtdbCbSk4UiGwZlhommkV0tgk=

Once that's done, proceed to
https://wiki.mageia.org/en/How_to_create_an_update_advisory#Advisories_Installation_.26_Configuration
Comment 11 Len Lawrence 2023-12-08 04:14:36 CET
Came back to this to check that the procedures had been followed correctly.
Logged in as user lcl on a machine called yildun.
Mageia id for tarazed contains a copy of mageia.pub which matches that in
~/.ssh and ends with '= lcl@yildun'.
$ cat .ssh/config
Host svn.mageia.org
IdentityFile /home/lcl/.ssh/mageia
Hostname svn.mageia.org
User tarazed
Compression yes
ServerAliveInterval 120
ForwardX11 no
ForwardAgent yes
AddressFamily inet

Host *
ForwardX11 yes
ForwardAgent yes

$ ssh tarazed@svn.mageia.org
You tried to execute: 
Sorry, you are not allowed to execute that command.
You are member of the following groups :
mga-users mga-qa-committers
Connection to svn.mageia.org closed.
$ cd ~/adv
$ svn up
Updating '.':
At revision 15368.

Added the dummy advisory to that directory.
$ ls 00002.adv
00002.adv
$ mgaadv mksite
That worked fine, generating HTML files in ~/html which could be examined in a browser.
$ svn diff
$ svn ci -m 'QA newbie test'
Adding         00002.adv
Transmitting file data .done
Committing transaction...
svn: E000013: Commit failed (details follow):
svn: E000013: Can't open file '/svn/advisories/db/txn-current-lock': Permission denied
Comment 12 Len Lawrence 2023-12-08 04:22:56 CET
And `svn diff` shows:
Index: 00002.adv
===================================================================
--- 00002.adv	(nonexistent)
+++ 00002.adv	(working copy)
@
......
Comment 13 Dave Hodgins 2023-12-08 07:10:16 CET
Try running
$ cd ~/mageia-advisories/advisories/
$ svn up

That should download all of the existing advisories so that what you have
is up-to-date with what is in the Mageia advisories svn server.

Running 'mgaadv new bugfix $bugnumber $srpmpackagename' creates a new advisory
in your ~/mageia-advisories/advisories/ directory.

Running 'svn add $bugnumber.adv' tells svn that the file is one that will
be tracked by svn.

Running 'svn ci -m "Adding bugfix advisory for $packagename mga#$bugnumber"'
"commits" or copies any changes that you've made to files tracked by svn
to the Mageia svn server.
Comment 14 Len Lawrence 2023-12-08 12:57:39 CET
Thanks Dave.
I had already tried to set up the mageia-advisories tree but could not get that to work.  Right now it should be empty but:
$ cd
$ du -hs mageia-advisories
30M	mageia-advisories

No hidden files as far as I can see.
$ cd ~/mageia-advisories
$ ls -i
8666730 advisories/  8673684 html/  8673686 status/
$ cd advisories
$ ls -ia
8666730 ./  8666729 ../

$ cd ~/mageia-advisories/advisories
$ svn up
Skipped '.'
svn: E155007: None of the targets are working copies

Copied 00002.adv to ~/mageia-advisories/advisories/ then
$ svn add 00002.adv
svn: warning: W150002: '/home/lcl/adv/00002.adv' is already under version control
svn: E200009: Could not add all targets because some targets are already versioned
svn: E200009: Illegal target for the requested operation

So it is already in the system somewhere....  Maybe I should create another dummy because this is the same file which other testers have used.
OK.  Did that.  Made trivial changes and used a different bug number.
$ cd
$ cd adv
$ svn up
Updating '.':
U    32601.adv
U    32552.adv
U    32551.adv
U    32546.adv
U    32245.adv
Updated to revision 15373.

$ cd ~/mageia-advisories/advisories
$ svn up
Skipped '.'
svn: E155007: None of the targets are working copies

The two advisories directories should be identical.
Comment 15 Len Lawrence 2023-12-08 13:07:14 CET
Another oddity, using the original directory and the renumbered and edited advisory:

$ cd ~/adv
$ svn ci -m "Whatever"
svn: E155010: Commit failed (details follow):
svn: E155010: '/home/lcl/adv/00002.adv' is scheduled for addition, but is missing

Added the original dummy file to ~/adv
$ svn ci -m "Whatever"
Adding         00002.adv
Transmitting file data .done
Committing transaction...
svn: E000013: Commit failed (details follow):
svn: E000013: Can't open file '/svn/advisories/db/txn-current-lock': Permission denied
$ ls 0000?.adv
00002.adv  00009.adv
Comment 16 Len Lawrence 2023-12-08 14:27:40 CET
$ ls adv | wc -l
7096
$ ls mageia-advisories/advisories | wc -l
1
Comment 17 Marja Van Waes 2023-12-13 23:17:03 CET
(In reply to Len Lawrence from comment #16)
> $ ls adv | wc -l
> 7096
> $ ls mageia-advisories/advisories | wc -l
> 1

On my system:

$ ls mageia-advisories/advisories | wc -l
7106

two of those files are from mga-advisor (that's a new script made by papoteur that works better for me than mgaadv)

$ ls -al mageia-advisories/advisories | grep ^d
drwxr-xr-x 3 marja marja 233472 dec 13 22:05 ./
drwxr-xr-x 5 marja marja   4096 dec 12 22:31 ../
drwxr-xr-x 4 marja marja   4096 sep 26 19:02 .svn/

The hidden .svn directory is very important, it is impossible to commit to svn without it. It is where svn tracks changes.

$ du -h mageia-advisories/ | tail -n3
34M     mageia-advisories/advisories/.svn
63M     mageia-advisories/advisories
63M     mageia-advisories/
Comment 18 Len Lawrence 2023-12-14 14:06:44 CET
Replying to Marja in comment 17:

Thanks for the  pointer to .svn.  It did not exist so I created it.
This what I have just now :-

$ tree -d mga-advisories
mga-advisories
├── advisories
├── html
└── status

4 directories

$ du -h mga-advisories/ | tail -n 3
4.0K	mga-advisories/advisories/.svn
236K	mga-advisories/advisories
30M	mga-advisories/

$ ls mga-advisories/advisories | wc -l
0
$ du -hs status
28M	status

Cleared out status.
$ cd advisories
$ svn up
Skipped '.'
svn: E155007: None of the targets are working copies
$ ls .svn
$

$ cd
$ mgaadv update
<long listing>
$ cd mga-advisories/
$ du -hs status
240K	status
$ svn up
Skipped '.'
svn: E155007: None of the targets are working copies

$ cd
$ du -h mga-advisories/ | tail -n 3
4.0K	mga-advisories/advisories/.svn
236K	mga-advisories/advisories
1.8M	mga-advisories/

.svn is still empty, so is advisories.
Comment 19 Marja Van Waes 2023-12-14 17:24:33 CET
(In reply to Len Lawrence from comment #18)
> Replying to Marja in comment 17:
> 
> Thanks for the  pointer to .svn.  It did not exist so I created it.

I did not need to create it. It was automatically created during my first svn checkout. IINM, it isn't created during an anonymous checkout.

What does your ~/mga-advisories/mga-advisories.conf contain?

Here is mine:

[marja@localhost ~]$ cat .mga-advisories/mga-advisories.conf 
---
advisories_dir: /home/marja/mageia-advisories/advisories
mode: qa
out_dir: /home/marja/mageia-advisories/html
status_dir: /home/marja/mageia-advisories/status
Comment 20 Len Lawrence 2023-12-14 17:54:34 CET
Replying to Marja in comment 19:
My configuration file matches yours and .mga-advisories has acquired an 8MB file containing all the advisories.

When starting all this I did not know about .svn and it did not appear during the initialisation.  The wiki says the user should create the directory structure to ensure that `mgaadv initqaconf` does not fail.
Comment 21 Len Lawrence 2023-12-14 18:03:30 CET
Just re-read the relevant section in the wiki and see that it mentions only the advisories directory.  My assumption, looking at the config file was that the other two branches had to be there as well.  Now it seems more likely that the config file is also a template for generating the rest of the directory structure.  Back to the drawing board....
Comment 22 Len Lawrence 2023-12-14 18:11:42 CET
That's not right either.  'mgaadv initqaconf' does not like the fact that a config file  already exists and gives up, so .... slate cleaned.
Comment 23 Marja Van Waes 2023-12-14 18:15:07 CET
(In reply to Marja Van Waes from comment #19)
> (In reply to Len Lawrence from comment #18)
> > Replying to Marja in comment 17:
> > 
> > Thanks for the  pointer to .svn.  It did not exist so I created it.
> 
> I did not need to create it. It was automatically created during my first
> svn checkout. IINM, it isn't created during an anonymous checkout.
> 

I was wrong about that, I just did an anonymous checkout with 
  svn checkout svn://svn.mageia.org/svn/advisories/
and the advisories directory is created and it does have the .svn directory in it.
Comment 24 Len Lawrence 2023-12-14 18:18:36 CET
lcl@yildun:mga-advisories $ mgaadv initqaconf
YAML Error: Couldn't open /home/lcl/.mga-advisories/mga-advisories.conf for output:
No such file or directory
   Code: YAML_DUMP_ERR_FILE_OUTPUT
 at /usr/share/perl5/vendor_perl/YAML.pm line 65.
Comment 25 Len Lawrence 2023-12-14 18:35:21 CET
Thanks Marja - using the anonymous checkout was the step I had forgotten.
That must be the way I first populated the advisories directory.  
$ ls .svn
entries  format  pristine/  tmp/  wc.db  wc.db-journal
Comment 26 Len Lawrence 2023-12-14 18:37:52 CET
Continuing from comment 25:
$ svn up
Updating '.':
At revision 15397.
Comment 27 Marja Van Waes 2023-12-14 18:39:27 CET
(In reply to Len Lawrence from comment #24)
> lcl@yildun:mga-advisories $ mgaadv initqaconf
> YAML Error: Couldn't open /home/lcl/.mga-advisories/mga-advisories.conf for
> output:
> No such file or directory
>    Code: YAML_DUMP_ERR_FILE_OUTPUT
>  at /usr/share/perl5/vendor_perl/YAML.pm line 65.

After starting with a clean slate, had you done both:

  mkdir ~/mageia-advisories/
  mkdir ~/.mga-advisories
Comment 28 Len Lawrence 2023-12-14 19:19:38 CET
In reply to Marja in comment #27:
The clean slate was emptying mga-advisories in the home directory and initially deleting the .mga-advisories directory so I recreated the latter and I think left it empty initially but cannot remember for sure.  If that did not work I would have recreated the configuration file mga-advisories.conf.

Attempts at committing still draw a blank, but no error messages.
Tried two dummy advisories in the advisories directory, 00008.adv and 00009.adv
first one then the other after removing the first.
$ svn ci -m "00008 advisory from QA"
$
Looks like it did not even try.
$ svn ci -m "dummy advisory from QA"
$

$ svn diff
$

$ cd .svn
$ ll
total 3348
-rw-r--r--   1 lcl lcl       3 Dec 14 16:22 entries
-rw-r--r--   1 lcl lcl       3 Dec 14 16:22 format
drwxr-xr-x 258 lcl lcl    4096 Dec 14 16:22 pristine/
drwxr-xr-x   2 lcl lcl    4096 Dec 14 16:23 tmp/
-rw-r--r--   1 lcl lcl 3411968 Dec 14 16:53 wc.db
-rw-r--r--   1 lcl lcl       0 Dec 14 16:53 wc.db-journal
Comment 29 Marja Van Waes 2023-12-14 19:36:27 CET
if "svn diff" doesn't show anything, then there is nothing to be committed.

Did you first run "svn add 00008.adv" ?
Comment 30 Len Lawrence 2023-12-14 20:23:34 CET
No.  Forgot that.  Duh!
Comment 31 Len Lawrence 2023-12-14 20:25:34 CET
$ svn add 00008.adv
A         00008.adv
$ svn ci -m "00008 advisory from QA"
svn: E170001: Commit failed (details follow):
svn: E170001: Authorization failed
Comment 32 Dave Hodgins 2023-12-14 20:32:26 CET
(In reply to Len Lawrence from comment #28)
> In reply to Marja in comment #27:
> The clean slate was emptying mga-advisories in the home directory and
> initially deleting the .mga-advisories directory so I recreated the latter
> and I think left it empty initially but cannot remember for sure.  If that
> did not work I would have recreated the configuration file
> mga-advisories.conf.
> 
> Attempts at committing still draw a blank, but no error messages.
> Tried two dummy advisories in the advisories directory, 00008.adv and
> 00009.adv

Be careful what is done in creating or changing advisories. They are shared
in https://svnweb.mageia.org/advisories/ when committed, after which they
are shared with everyone who uses svn for advisories.

When updates are pushed, the advisories are also shared in
http://advisories.mageia.org/ and the mailing list
https://ml.mageia.org/l/info/updates-announce

For learning, use this bug number as in "mgaadv new bugfix 32424", or create
a new bug in bugzilla, for your personal use. As that bug will never be
validated, it will never be pushed/published.

When starting, run "mkdir .mga-advisories",  then run "mgaadv initqaconf".
When run as user "tester", initqaconf creates ...
$ cat .mga-advisories/mga-advisories.conf 
---
advisories_dir: /home/tester/mageia-advisories/advisories
mode: qa
out_dir: /home/tester/mageia-advisories/html
status_dir: /home/tester/mageia-advisories/status

It also creates ...
$ tree -if mageia-advisories/
mageia-advisories
mageia-advisories/html
mageia-advisories/status

If your current directory is not "~/mageia-advisories/" or whatever
directory, you've changed it to by renaming the directory and updating
the ".mga-advisories/mga-advisories.conf" file.

So assuming the names have not been changed, run "cd ~/mageia-advisories",
then run "svn up.

If that works, you're ready to try adding an advisory.
Comment 33 Dave Hodgins 2023-12-14 20:40:35 CET
Also, the files should not have leading zeros.
https://bugs.mageia.org/show_bug.cgi?id=8 is an existing bug, though it
doesn't have and advisory.
Comment 34 Len Lawrence 2023-12-14 21:13:53 CET
In reply to Dave Hodgins in comments #32, #33:
Thanks Dave.  Shall catch up with this sometime.
Comment 35 Dave Hodgins 2023-12-14 22:01:54 CET Comment hidden (obsolete)
Comment 36 Dave Hodgins 2023-12-14 22:03:28 CET
In comment 32, I meant to put ...

If your current directory is not "~/mageia-advisories/advisories/" or
whatever directory, you've changed it to by renaming the directory and
updating the ".mga-advisories/mga-advisories.conf" file, "svn up" will
not work.
Comment 37 Dave Hodgins 2023-12-14 22:08:00 CET
To demonstrate ...

[dave@x3 ~]$ cd ~/mageia-advisories/
[dave@x3 mageia-advisories]$ svn up
Skipped '.'
svn: E155007: None of the targets are working copies
[dave@x3 mageia-advisories]$ cd ~/mageia-advisories/advisories/
[dave@x3 advisories]$ svn up
Updating '.':
At revision 15400.
Comment 38 Len Lawrence 2023-12-14 22:40:49 CET
Guilty, m'lud.

lcl@yildun:advisories $ svn up
Updating '.':
A    32578.adv
U    22553.adv
U    32608.adv
Updated to revision 15400.
Comment 39 Marja Van Waes 2023-12-16 19:44:29 CET
@ Len,

Could you please do the following:

Fetch the two files here https://gitweb.mageia.org/software/infrastructure/mga-advisor/tree/ and put them where you like.

After that:
* open a bug report from https://madb.mageia.org/tools/updates
* make sure it has a package name in the "Source RPM:" field
* make sure you have an ssh-agent running
* in a terminal go to the directory where you put those two files
* run "python mga-advisor.py"... an interface will start
* Add the bug number in the top field of the Mageia advisor window
* press "enter" (or click on "Retrieve info")
* and wait until you no longer see "Loading..." on the bottom left, above the "Cancel" button

The latest SRPMs for Mageia 8 and 9 should now have been automatically added to the field where sources can be added and removed. 

Does that work for you?

You can close the application.
Comment 40 Marja Van Waes 2023-12-16 19:58:19 CET
(In reply to Marja Van Waes from comment #39)
> @ Len,
 
> 
> Does that work for you?
>

If not, then mga-qa-committers need additional rights for that, too.
Comment 41 Len Lawrence 2023-12-16 21:08:34 CET
Replying to Marja in comment #39
$ ps aux | grep ssh-agent
lcl      3717555  0.0  0.0   7884  5760 ?        S    17:40   0:00 /usr/bin/ssh-agent -D -a /run/user/1000/keyring/.ssh

Looking at bug 32622 in firefox at madb and tried running the advisory gui.
$ python mga-advisor.py
  File "/home/lcl/web/mga-advisor.py", line 1
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax

So, it looks like the download did not work properly....
Going back to the infrastructure site, opening mga-advisory.py in a new tab displays the python code so I pasted that into an editor and saved it as the python file.
$ python mga-advisor.py 
Traceback (most recent call last):
  File "/home/lcl/web/mga-advisor.py", line 12, in <module>
    from PySide6.QtWidgets import (
ModuleNotFoundError: No module named 'PySide6'

There may well be missing Qt libraries.
Comment 42 Marja Van Waes 2023-12-16 21:57:27 CET
(In reply to Len Lawrence from comment #41)

> $ python mga-advisor.py 
> Traceback (most recent call last):
>   File "/home/lcl/web/mga-advisor.py", line 12, in <module>
>     from PySide6.QtWidgets import (
> ModuleNotFoundError: No module named 'PySide6'
> 
> There may well be missing Qt libraries.

Can you try installing python3-pyside6-widgets ?

I have both lib64pyside6-devel and  python3-pyside6-widgets and both seem to provide PySide6.QtWidgets
Comment 43 Len Lawrence 2023-12-16 22:21:26 CET
Right-ho.  Here goes:
$ python mga-advisor.py
Designer: Invalid UI file: The root element <ui> is missing.
Traceback (most recent call last):
  File "/home/lcl/web/mga-advisor.py", line 321, in <module>
    widget = Widget()
  File "/home/lcl/web/mga-advisor.py", line 73, in __init__
    self.load_ui()
  File "/home/lcl/web/mga-advisor.py", line 81, in load_ui
    self.ui = loader.load(ui_file, self)
RuntimeError: Unable to open/read ui device

This is developers territory.
Presumably the ui_file is form.ui, which is in the same directory.  Maybe it needs to go somewhere else?
Comment 44 Dave Hodgins 2023-12-16 22:27:23 CET
(In reply to Len Lawrence from comment #43)
> Right-ho.  Here goes:
> $ python mga-advisor.py
> Designer: Invalid UI file: The root element <ui> is missing.
> Traceback (most recent call last):
>   File "/home/lcl/web/mga-advisor.py", line 321, in <module>
>     widget = Widget()
>   File "/home/lcl/web/mga-advisor.py", line 73, in __init__
>     self.load_ui()
>   File "/home/lcl/web/mga-advisor.py", line 81, in load_ui
>     self.ui = loader.load(ui_file, self)
> RuntimeError: Unable to open/read ui device
> 
> This is developers territory.
> Presumably the ui_file is form.ui, which is in the same directory.  Maybe it
> needs to go somewhere else?

When downloading from git, the plain version must be used, as in
wget https://gitweb.mageia.org/software/infrastructure/mga-advisor/plain/form.ui
https://gitweb.mageia.org/software/infrastructure/mga-advisor/plain/mga-advisor.py

Also, run "urpmi pyinstaller python3-pyside6".
Comment 45 Len Lawrence 2023-12-16 22:53:46 CET
Continuing from comment 43:

line 79...
        path = Path(__file__).resolve().parent / "form.ui"
        ui_file = QFile(path)
        ui_file.open(QFile.ReadOnly)

That looks OK.  

$ less form.ui:
<!DOCTYPE html>
<html lang='en'>
<head>
<title>form.ui - mga-advisor - GUI for mgaadv</title>
<meta name='generator' content='cgit v1.2.1'/>
<meta name='robots' content='index, nofollow'/>
<

$ grep '<ui>' form.ui
$

@Dave Hodgins in comment 44
"Also, run \"urpmi pyinstaller python3-pyside6\"."
Did that.

And yes, wget does it better for the ui.  It now launches and shows the information for the bug in question.

In reply to @Marja in comment #39:
Yes it works for me - the SRPMS versions for update are displayed.
Comment 46 Marja Van Waes 2023-12-16 23:50:25 CET
Thanks Dave and Len.

Len, can you now test creating and committing a fake advisory with mga-advisor for bug #3
That is a test bug. You can just complete the subject as you like and create a Description.

There is no null in Mageia 8 (except in backports_testing), so mga-advisor won't find a Mga8 source. 

There's a preview button at the bottom, and a button to export it to
 ~/mageia-advisories/advisories

After exporting, and after running 
  svn up
and 
  svn add 3.adv

you can commit it, e.g. with: 
  svn ci -m 'Add a test advisory'

If committing succeeds, then no additional action from neoclust is needed to fix your commit rights. The fake advisory can then be removed with 
  svn delete 3.adv
and then committing, e.g. with 
  svn ci -m 'remove test advisory'
Comment 47 Ben McMonagle 2023-12-17 05:47:57 CET
keeping tabs.

When Len is up and running ,I will follow and see how far I get.
Comment 48 Marja Van Waes 2023-12-17 13:17:10 CET
> After exporting, and after running 
>   svn up
> and 
>   svn add 3.adv

I was assuming you that this is a clean checkout in which you haven't changed anything. "svn diff" will show any other added files or changes in files, that, if present, would be committed, too, when you would continue. We don't commit more than one (change to) a file at one time.

> 
> you can commit it, e.g. with: 
>   svn ci -m 'Add a test advisory'
>
Comment 49 Len Lawrence 2023-12-17 14:06:51 CET
The editor seems to be working OK and the modified file appears in the advisories directory.   But... `svn up` is no longer working from ~/mageia-advisories/advisories.  

So,
$ svn add 3.adv
svn: E155007: '/home/lcl/mageia-advisories/advisories' is not a working copy
is probably to be expected.
$ svn diff
svn: E155007: '/home/lcl/mageia-advisories/advisories' is not a working copy

I am about to give up on all this.
Comment 50 Len Lawrence 2023-12-17 15:36:22 CET
Found the problem.  The mageia-advisories directory is hard-coded in the python script whereas I had abandoned that directory but forgotten that (I prefer shorter names because of very slow typing speed).  Copying 3.adv to mga-advisories/advisories restored the balance.  I guess I shall have to go with the flow and rename  the root to mageia-advisories.  `svn diff` and `svn up` work now.
$ svn add 3.adv
A         3.adv
$ svn ci -m 'Add a test advisory'
svn: E170001: Commit failed (details follow):
svn: E170001: Authorization failed

So, no advance yet.
Comment 51 Len Lawrence 2023-12-17 16:12:03 CET
Went back to the beginning, deleting and recreating directory tree.  Checked the config file.  Moved to ~/mageia-advisories/advisories and performed an anonymous checkout to repopulate the folder.
$ svn diff
$ svn up
Updating '.':
At revision 15423.

Copied 3.adv to advisories directory.
$ svn add 3.adv
A         3.adv
$ svn ci -m 'Add a test advisory'
svn: E170001: Commit failed (details follow):
svn: E170001: Authorization failed
Comment 52 Marja Van Waes 2023-12-17 18:23:06 CET
I've asked neoclust to add you to https://people.mageia.org/g/mga-packagers.html, like he did for Ben
Comment 53 Len Lawrence 2023-12-17 18:26:42 CET
Thank you Marja.  You have been a great help all along.
Comment 54 Marja Van Waes 2023-12-18 23:21:11 CET
(In reply to Len Lawrence from comment #53)
> Thank you Marja.  You have been a great help all along.

You're welcome, it is nothing compared to what some others do here :-)

Can you try committing to SVN again, please? You should have the needed rights now.
Comment 55 Len Lawrence 2023-12-19 03:11:19 CET
Replying to Marja in comment #54:

I tried it earlier and it failed.  It still fails.

$ svn ci -m 'Add a test advisory'
svn: E170001: Commit failed (details follow):
svn: E170001: Authorization failed

From what I remember it is not the individual but the group mga-qa-committers (?) which required the rights.  Might be wrong.
Comment 56 Len Lawrence 2023-12-19 03:16:18 CET
I belong to : mga-users mga-shell_access mga-packagers mga-qa-committers
mga-packagers should have that access so this is getting beyond me.
It may turn out to be something else entirely that is going wrong.
Comment 57 Marja Van Waes 2023-12-19 14:23:49 CET
(In reply to Len Lawrence from comment #55)
> Replying to Marja in comment #54:
> 
> I tried it earlier and it failed.  It still fails.
> 
> $ svn ci -m 'Add a test advisory'
> svn: E170001: Commit failed (details follow):
> svn: E170001: Authorization failed
> 
> From what I remember it is not the individual but the group
> mga-qa-committers (?) which required the rights.

...but doesn't have it. Adding you and Ben to mga-packagers is a workaround that is supposed to work.

> Might be wrong.

(In reply to Len Lawrence from comment #56)
> I belong to : mga-users mga-shell_access mga-packagers mga-qa-committers
> mga-packagers should have that access so this is getting beyond me.
> It may turn out to be something else entirely that is going wrong.

Mabye a sysadmin could look at what is happening on their side, when you try to commit. Would you be able to join their channel on IRC ircs://irc.libera.chat:6697/#mageia-sysadm and say something like "/me is looking for a sysadmin to help with bug 32424" or so?
Comment 58 Pascal Terjan 2023-12-19 18:33:49 CET
Comment #51 says you performed an anonymous checkout, so you can't commit. You need to switch it to use SSH.

By the way I may have fixed the permissions to no longer need to add people to mga-packagers, or broken everything.
Comment 59 Len Lawrence 2023-12-19 19:22:19 CET
In reply to Pascal Terjan in comment 58:
How do I use SSH to checkout?  Shall look at the wiki again when I have time.
Comment 60 Marja Van Waes 2023-12-19 19:55:25 CET
(In reply to Len Lawrence from comment #59)
> In reply to Pascal Terjan in comment 58:
> How do I use SSH to checkout?  Shall look at the wiki again when I have time.

Can you first try whether the following command works to list all files in the advisories directory in SVN:

$ svn ls svn+ssh://svn.mageia.org/svn/advisories/
Comment 61 Dave Hodgins 2023-12-19 20:53:39 CET
(In reply to Len Lawrence from comment #55)
> Replying to Marja in comment #54:
> 
> I tried it earlier and it failed.  It still fails.
> 
> $ svn ci -m 'Add a test advisory'
> svn: E170001: Commit failed (details follow):
> svn: E170001: Authorization failed
> 
> From what I remember it is not the individual but the group
> mga-qa-committers (?) which required the rights.  Might be wrong.

Did you remember to have the current directory be
"~/mageia-advisories/advisories/"?
Comment 62 Len Lawrence 2023-12-20 01:59:48 CET
@Dave Hodgins in comment #61:
Yes.

@Marja in comment #60:
That did work.
Comment 63 Marja Van Waes 2023-12-20 14:00:56 CET
(In reply to Len Lawrence from comment #62)
> @Dave Hodgins in comment #61:
> Yes.
> 
> @Marja in comment #60:
> That did work.

Then now remove the advisories directory, and, while being in
 ~/mageia-advisories
run
 svn co svn+ssh://svn.mageia.org/svn/advisories/
Comment 64 Len Lawrence 2023-12-20 21:22:48 CET
Replying to Marja Van Waes in comment #63:
Removed the advisories directory.

lcl@yildun:mageia-advisories $ svn co svn+ssh://svn.mageia.org/svn/advisories/
svn: E170013: Unable to connect to a repository at URL 'svn+ssh://svn.mageia.org/svn/advisories'
svn: E210002: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: E210002: Network connection closed unexpectedly

True enough.  There is no Subversion configuration file in user directory.
$ cd .config
$ ls *svn*
ls: cannot access '*svn*': No such file or directory

~/.local/share has nothing relevant either.
Comment 65 Len Lawrence 2023-12-20 21:33:51 CET
Replying to comments #63, #64:

However, a second try succeeded.
$ svn co svn+ssh://svn.mageia.org/svn/advisories/
[...]
A    advisories/10351.adv
A    advisories/.gitignore
Checked out revision 15435.
$ ls advisories
[...]
16087.adv       21606.adv       25668.adv       29317.adv
16094.adv       21607.adv       25673.adv       29319.adv
$ ls -a advisories/.svn
./  ../  entries  format  pristine/  tmp/  wc.db  wc.db-journal
$ ll advisories/29319.adv
-rw-r--r-- 1 lcl lcl 617 Dec 20 19:25 advisories/29319.adv
Comment 66 Len Lawrence 2023-12-20 21:40:26 CET
Further to comment #64:

There is a system subversion directory in /etc with a config file in which the tunnels section is all comments and no -q option mentioned.
Comment 67 Marja Van Waes 2023-12-20 23:15:33 CET
(In reply to Len Lawrence from comment #66)
> Further to comment #64:
> 
> There is a system subversion directory in /etc with a config file in which
> the tunnels section is all comments and no -q option mentioned.

I have a config file in my .subversion directory. 

It does mention a -q option:

### (If the URL includes a username, then the hostname will be
### passed to the tunnel agent as <user>@<hostname>.)  If the
### built-in ssh scheme were not predefined, it could be defined
### as:
# ssh = $SVN_SSH ssh -q

but it doesn't matter, something else must have been temporarily wrong, since it worked the second time you tried.

Can you now create that test advisory from comment 46 for test bug #3 and commit it?
Comment 68 Len Lawrence 2023-12-21 01:38:03 CET
Replying to Marja Van Waes in comment #67:

advisories $ svn ci -m 'Add a test advisory'
advisories $

No errors.

$ svn diff
$ svn up
Updating '.':
At revision 15435.

That looks as if it means nothing happened.
Comment 69 Len Lawrence 2023-12-21 02:02:31 CET
Continuing from comment #68:

Discovered that 3.adv had gone missing so replaced it and tried again.
$ svn ci -m 'Add a test advisory'
Adding         3.adv
Transmitting file data .done
Committing transaction...
Committed revision 15436.
$ svn up
Updating '.':
At revision 15436.

So, success at last.
Comment 70 Len Lawrence 2023-12-21 02:48:09 CET
Tried removing the test advisory:
$ mv 3.adv ~
$ svn up
Updating '.':
Restored '3.adv'
At revision 15437.
Comment 71 Len Lawrence 2023-12-21 11:32:45 CET
And finally;

$ svn delete 3.adv
D         3.adv

leaving the field clear for other testers.
Comment 72 Marja Van Waes 2023-12-21 18:30:11 CET
(In reply to Len Lawrence from comment #71)
> And finally;
> 
> $ svn delete 3.adv
> D         3.adv
> 
> leaving the field clear for other testers.

Nice that it all works, now.

You forgot to commit the deleting of 3.adv, you still need to run: 

   svn ci -m 'delete test file 3.adv'

(or whatever message you prefer)
Comment 73 Marja Van Waes 2023-12-21 18:33:18 CET
(In reply to Pascal Terjan from comment #58)

> 
> By the way I may have fixed the permissions to no longer need to add people
> to mga-packagers, or broken everything.

Thanks :-)

So now we need to test whether, after removing tarazed, benmc and me from the mga-packagers group, whether we can still commit advisories, right?
Comment 74 Len Lawrence 2023-12-21 19:15:19 CET
In reply to Marja Van Waes in comment #72:

Thanks again Marja.  I did not forget - just another one of the thousand things I did not know!

$ svn ci -m 'delete test file 3.adv'
Deleting       3.adv
Committing transaction...
Committed revision 15439.
Comment 75 Len Lawrence 2023-12-21 19:55:54 CET
Ah.  Got the picture at last.  Any changes made at this end are not reflected in  SVN without a committal, so 'svn delete' is a purely local command.
Comment 76 katnatek 2024-02-09 00:04:22 CET
Still valid

LC_ALL=C svn ci -m 'Advisory for mga#32816'
Adding         32816.adv
Transmitting file data .done
Committing transaction...
svn: E000013: Commit failed (details follow):
svn: E000013: Can't open file '/svn/advisories/db/txn-current-lock': Permission denied
katnatek 2024-02-09 00:06:05 CET

CC: (none) => j.alberto.vc

Comment 77 katnatek 2024-02-14 02:51:38 CET
(In reply to Pascal Terjan from comment #58)
> Comment #51 says you performed an anonymous checkout, so you can't commit.
> You need to switch it to use SSH.
> 
> By the way I may have fixed the permissions to no longer need to add people
> to mga-packagers, or broken everything.

Still can't upload advisories

(In reply to katnatek from comment #76)
> Still valid
> 
> LC_ALL=C svn ci -m 'Advisory for mga#32816'
> Adding         32816.adv
> Transmitting file data .done
> Committing transaction...
> svn: E000013: Commit failed (details follow):
> svn: E000013: Can't open file '/svn/advisories/db/txn-current-lock':
> Permission denied

https://people.mageia.org/u/katnatek.html

Its posible that other actions break what you did?
By example the permissions for dnf metadata need to be fixed each time the packages are moved
Comment 78 katnatek 2024-02-14 02:53:33 CET
(In reply to Dave Hodgins from comment #44)
> (In reply to Len Lawrence from comment #43)
> > Right-ho.  Here goes:
> > $ python mga-advisor.py
> > Designer: Invalid UI file: The root element <ui> is missing.
> > Traceback (most recent call last):
> >   File "/home/lcl/web/mga-advisor.py", line 321, in <module>
> >     widget = Widget()
> >   File "/home/lcl/web/mga-advisor.py", line 73, in __init__
> >     self.load_ui()
> >   File "/home/lcl/web/mga-advisor.py", line 81, in load_ui
> >     self.ui = loader.load(ui_file, self)
> > RuntimeError: Unable to open/read ui device
> > 
> > This is developers territory.
> > Presumably the ui_file is form.ui, which is in the same directory.  Maybe it
> > needs to go somewhere else?
> 
> When downloading from git, the plain version must be used, as in
> wget
> https://gitweb.mageia.org/software/infrastructure/mga-advisor/plain/form.ui
> https://gitweb.mageia.org/software/infrastructure/mga-advisor/plain/mga-
> advisor.py
> 
> Also, run "urpmi pyinstaller python3-pyside6".

Need also python3-yaml
Comment 79 katnatek 2024-02-15 20:23:49 CET
I remember that I have to set ssh+svn://server/path in mandriva times but was in tortoise, and I just find how to make it in that application, how I know the svn -ci command is using svn+ssh?
Comment 80 Dan Fandrich 2024-02-15 20:29:00 CET
"svn info" will show you

CC: (none) => dan

Comment 81 katnatek 2024-02-15 20:32:38 CET
(In reply to Dan Fandrich from comment #80)
> "svn info" will show you

LC_ALL=C svn info
Path: .
Working Copy Root Path: /home/katnatek/mageia-advisories/advisories
URL: svn+ssh://svn.mageia.org/svn/advisories
Relative URL: ^/
Repository Root: svn+ssh://svn.mageia.org/svn/advisories
Repository UUID: a8077519-72a2-4b74-ad45-c9eb48fb5b49
Revision: 15684
Node Kind: directory
Schedule: normal
Last Changed Author: danf
Last Changed Rev: 15684
Last Changed Date: 2024-02-15 12:25:28 -0600 (Thu, 15 Feb 2024)

Then is right 
 All I found about svn: E000013: Can't open file '/svn/advisories/db/txn-current-lock': Permission denied point to rights issues
Comment 82 Dave Hodgins 2024-02-15 20:40:54 CET
$ grep -v -e ^'#' -e ^$ .subversion/config
[auth]
[helpers]
[tunnels]
ssh = $SVN_SSH ssh 
[miscellany]
[auto-props]

In .ssh/config, for mageia I have
Host svn.mageia.org
 IdentityFile /home/dave/.ssh/mageia
 Hostname svn.mageia.org
 User davidwhodgins
 Compression yes
 ServerAliveInterval 120
 ForwardX11 no
 AddressFamily inet

The AddressFamily inet is probably not needed. I have it from when I
was having some trouble with ipv6 access.

$ ls -l /svn/advisories/db/txn-current-lock
ls: cannot access '/svn/advisories/db/txn-current-lock': No such file or directory

$ tree -ifaugp mageia-advisories|grep -v -e status -e html -e pristine -e '\.adv'
[drwxr-xr-x dave     dave    ]  mageia-advisories
[drwxr-xr-x dave     dave    ]  mageia-advisories/advisories
[-rw-r--r-- dave     dave    ]  mageia-advisories/advisories/.gitignore
[drwxr-xr-x dave     dave    ]  mageia-advisories/advisories/.svn
[drwxr-xr-x dave     dave    ]  mageia-advisories/advisories/.svn/tmp
[-rw-r--r-- dave     dave    ]  mageia-advisories/advisories/.svn/wc.db
[-rw-r--r-- dave     dave    ]  mageia-advisories/advisories/.svn/wc.db-journal

$ cat mageia-advisories/advisories/.gitignore
*~



If that file is there, it's likely leftover from a failed attempt and should
be deleted.
Comment 83 Dave Hodgins 2024-02-15 20:43:03 CET
Note that no file in ~.ssh should have group or other read or write permission.
Comment 84 Dan Fandrich 2024-02-15 20:52:41 CET
I believe the necessary group for advisories is mga-shell_access. You're missing that, and that would explain the txn lock file is because you don't have write access to /svn/advisories/db/. advisories is set up a bit strangely this way, because the repo root is owned by mga-qa-committers, which I think is the expected membership needed to write to this.

It's probably better to fix that than to add you to another group that doesn't seem like it has anything to do with the topic. One of the other sysadmins can chime in about which is the right approach.
Comment 85 katnatek 2024-02-15 21:06:00 CET
(In reply to Dave Hodgins from comment #83)
> Note that no file in ~.ssh should have group or other read or write
> permission.

I think I have all right here I can

svn co svn+ssh://svn.mageia.org/svn/advisories

But not 

svn ci

I add ssh = $SVN_SSH ssh to ~/.subversion/config , I'll check after the QA meeting
Comment 86 Marja Van Waes 2024-02-15 21:46:53 CET
(In reply to Dan Fandrich from comment #84)
> I believe the necessary group for advisories is mga-shell_access. 

I can upload advisories, but am not listed here 
https://people.mageia.org/g/mga-shell_access.html
Comment 87 Dan Fandrich 2024-02-15 22:30:04 CET
If you check on the server itself, you are a member. It looks like you're getting that membership transitively through your membership in mga-i18n-committers (which doesn't show up in that web page). Maybe giving mga-qa-committers members membership in mga-shell_access is the solution here.
Comment 88 Dave Hodgins 2024-02-15 22:54:34 CET
I'm in the groups
mga-qa mga-qa-committers mga-board mga-iso-testers mga-council mga-association-members
Comment 89 Dan Fandrich 2024-02-15 23:08:37 CET
David, your mga-shell_access access is coming via mga-qa.

It's looking more and more like giving mga-qa-committers members membership is the solution. I suspect everyone else who needed it already had that access through another group. In fact, I just went through the other members of mga-qa-committers and it looks like katnatek is the only one that's missing it, so doing this will only affect one person.

I don't have access to do this myself, but I think getting one of the other sysadmins to add mga-qa-committers to mga-shell_access will solve this.
Comment 90 katnatek 2024-02-16 00:14:24 CET
(In reply to Dan Fandrich from comment #89)
> David, your mga-shell_access access is coming via mga-qa.
> 
> It's looking more and more like giving mga-qa-committers members membership
> is the solution. I suspect everyone else who needed it already had that
> access through another group. In fact, I just went through the other members
> of mga-qa-committers and it looks like katnatek is the only one that's
> missing it, so doing this will only affect one person.
> 
> I don't have access to do this myself, but I think getting one of the other
> sysadmins to add mga-qa-committers to mga-shell_access will solve this.

I have shell access

https://people.mageia.org/u/katnatek.html
Comment 91 Dan Fandrich 2024-02-16 00:28:16 CET
You have mga-unrestricted_shell_access but not mga-shell_access
Comment 92 katnatek 2024-02-16 01:39:21 CET
(In reply to Dan Fandrich from comment #89)
> David, your mga-shell_access access is coming via mga-qa.
> 
> It's looking more and more like giving mga-qa-committers members membership
> is the solution. I suspect everyone else who needed it already had that
> access through another group. In fact, I just went through the other members
> of mga-qa-committers and it looks like katnatek is the only one that's
> missing it, so doing this will only affect one person.
> 
> I don't have access to do this myself, but I think getting one of the other
> sysadmins to add mga-qa-committers to mga-shell_access will solve this.

(In reply to Dan Fandrich from comment #91)
> You have mga-unrestricted_shell_access but not mga-shell_access

Then in theory if an admin adds me to mga-qa it must work?
Comment 93 Dan Fandrich 2024-02-16 03:03:54 CET
Yes, that would be another way to fix it.
Comment 94 katnatek 2024-02-16 03:23:36 CET
I Contact to sysadmin to do it, I'll check again when is done
Comment 95 katnatek 2024-02-16 19:31:32 CET
svn ci  -m 'Advisory for mga#32852'
Añadiendo      32852.adv
Transmitiendo contenido de archivos .done
Committing transaction...
Commit de la revisión 15686.


neoclust add me to mga-qa and that did the trick 
Thank you Dan for you help and research
Comment 96 Dan Fandrich 2024-02-17 07:02:13 CET
Glad we figured it out.

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 97 katnatek 2024-02-17 17:16:49 CET
And thanks to Marja , Dave and all the commenters, almost all in this bug help me too to track my steps and make sure all is as must