Re: [Rpm-maint] [rpm-software-management/rpm] Check the validity of hash algo (PR #3416)

2024-10-30 Thread xujing
> What verification are you talking about, specifically? The term is overloaded 
> in multiple places around rpm...
> 
> If an unknown algorithm causes us to give an OK to an unverifiable signature 
> then we obviously do have a rather bug someplace.

If xxx.rpm has been signed (Assume that the hash algorithm is hash_algo1 and 
the encryption and decryption algorithm is ecdsa.) , and the current RPM does 
not support hash_algo1. Run the `rpm -Kv xxx.rpm` command, no error message is 
displayed and the value of `$?` is 0.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3416#issuecomment-2446772260
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Check the validity of hash algo (PR #3416)

2024-10-30 Thread xujing
@JetXujing pushed 1 commit.

8a22a51af8e9f7de274f49c3a392ba0af66f4ff2  Check the validity of hash algo

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3416/files/1f071c8f73006ce12d021f2e7062e4a1e504b2ad..8a22a51af8e9f7de274f49c3a392ba0af66f4ff2
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Check the validity of hash algo (PR #3416)

2024-10-30 Thread xujing
If an RPM package has been signed and the hash algorithm is not supported by 
the current version, no error is reported during the verification of the RPM 
package, and "$?" return 0. Fix this problem.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3416

-- Commit Summary --

  * Check the validity of hash algo

-- File Changes --

M lib/rpmvs.cc (30)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3416.patch
https://github.com/rpm-software-management/rpm/pull/3416.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3416
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Check the validity of hash algo (PR #3416)

2024-10-30 Thread xujing
@JetXujing pushed 1 commit.

1f071c8f73006ce12d021f2e7062e4a1e504b2ad  Check the validity of hash algo

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3416/files/75e64330aa964d145470e6e3b39d62ca6822..1f071c8f73006ce12d021f2e7062e4a1e504b2ad
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-19 Thread xujing
@JetXujing pushed 1 commit.

fbd3079a023e7e8d99375d79bb31d536bdfdfd2b  Fix memleak when process policies

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301/files/d4fc6aa1633cf60ee6cd287296b106b1f212d7a7..fbd3079a023e7e8d99375d79bb31d536bdfdfd2b
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-19 Thread xujing
@JetXujing commented on this pull request.



> @@ -298,6 +299,9 @@ static rpmRC processPolicies(rpmSpec spec, Package pkg, 
> int test)
 free(name);
 free(types);
 
+if (optCon)

done

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301#discussion_r1766469919
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-19 Thread xujing
> You don't need to test against NULL, and you can just assign like this, it 
> always returns NULL for this very purpose: `optCon = poptFreeContext(optCon)`

Thank you for your review comments. The poptFreeContext function has no return 
value, is the usage of `optCon = poptFreeContext(optCon)` reasonable?

poptFreeContext declares as follows:
`void poptFreeContext(poptContext con);`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301#issuecomment-2360409887
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-19 Thread xujing
This is what I found by static analysis of the code.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301#issuecomment-2360363424
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-19 Thread xujing
@JetXujing pushed 1 commit.

9d9f9a56dba6e5a161643cf99ecb2bfda58eccd8  Fix memleak when process policies

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301/files/7a178ead29a3b548fe0a45e9fcdba25551f3f729..9d9f9a56dba6e5a161643cf99ecb2bfda58eccd8
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-19 Thread xujing
@JetXujing pushed 1 commit.

d4fc6aa1633cf60ee6cd287296b106b1f212d7a7  Fix memleak when process policies

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301/files/9d9f9a56dba6e5a161643cf99ecb2bfda58eccd8..d4fc6aa1633cf60ee6cd287296b106b1f212d7a7
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-19 Thread xujing
> What version of popt is that? Oh, at least the man page is wrong on that, it 
> claims void but the actual header (on popt 1.19) is:
> 
> ```
> /**
>  * Destroy context.
>  * @param con   context
>  * @return  NULL always
>  */
> poptContext poptFreeContext( poptContext con);
> ```

The code has been updated.
The man page I looked at earlier. I reconfirmed the code and found that the 
return value had changed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301#issuecomment-2360437496
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-19 Thread xujing
@JetXujing pushed 1 commit.

44fe8cbb65ecefdd866c4e8717228ec82b4c92cd  Fix memleak when process policies

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301/files/fbd3079a023e7e8d99375d79bb31d536bdfdfd2b..44fe8cbb65ecefdd866c4e8717228ec82b4c92cd
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-19 Thread xujing
> This will fix a leak on early exit or case of single policy, but it should 
> additionally be freed in the for-loop. 

Yes, it should be freed in the for-loop

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301#issuecomment-2360369409
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] The test cases of "rpm -e and verify colored files removed 2.{1, 2}" seem meaningless (Issue #3295)

2024-09-18 Thread xujing
Oh, I see, I didn't think about it: AT_XFAIL_IF will be removed if 
https://github.com/rpm-software-management/rpm/issues/1800 is fixed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3295#issuecomment-2357841440
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] The test cases of "rpm -e and verify colored files removed 2.{1, 2}" seem meaningless (Issue #3295)

2024-09-18 Thread xujing
Closed #3295 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3295#event-14303602606
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Fix memleak when process policies (PR #3301)

2024-09-12 Thread xujing
Fix memleak when process policies
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3301

-- Commit Summary --

  * Fix memleak when process policies

-- File Changes --

M build/policies.c (3)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3301.patch
https://github.com/rpm-software-management/rpm/pull/3301.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3301
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] The test cases of "rpm -e and verify colored files removed 2.{1, 2}" seem meaningless (Issue #3295)

2024-09-10 Thread xujing
Why are the following two test cases expected to fail? I see that the test case 
is introduced because of 
https://github.com/rpm-software-management/rpm/issues/1800. I think people 
expect to see that the test case is successfully executed (that is, "missing 
/usr/bin/hello" is displayed in the command output). The test case is expected 
to fail because the https://github.com/rpm-software-management/rpm/issues/1800 
problem has not been resolved.
https://github.com/rpm-software-management/rpm/blob/5688de1c0fd1a4a938dca02efea122457c64401a/tests/rpme.at#L234
https://github.com/rpm-software-management/rpm/blob/5688de1c0fd1a4a938dca02efea122457c64401a/tests/rpme.at#L259

I think the test cases is unreasonable, and they simply give the expected 
results on the basis of errors. In other words, if the 
https://github.com/rpm-software-management/rpm/issues/1800 problem is fixed 
later, these two test cases may fail, but in fact, this is the expected normal 
result, and the test cases should be modified. In this case, the existence of 
the test cases is meaningless.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3295
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 264: rpmsign --addsign FAILED (rpmsigdig.at:461) (Issue #3277)

2024-09-06 Thread xujing
> Out of curiosity: what gpg version is this? I've never seen such behavior 
> from it in the tests.

[root@localhost SPECS]# gpg --version
gpg (GnuPG) 2.4.3
libgcrypt 1.10.2-unknown
Copyright (C) 2023 g10 Code GmbH
License GNU GPL-3.0-or-later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /root/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3277#issuecomment-2333446523
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Specify the private key in "rpm --addsign" (PR #3281)

2024-09-05 Thread xujing
Using "*.secret" may cause "rpm --addsign" to fail, and the 
testcase is actually related only to rpm.org-rsa-2048-test.secret.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3281

-- Commit Summary --

  * Specify the private key in "rpm --addsign"

-- File Changes --

M tests/rpmsigdig.at (2)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3281.patch
https://github.com/rpm-software-management/rpm/pull/3281.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3281
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] 264: rpmsign --addsign FAILED (rpmsigdig.at:461) (Issue #3277)

2024-09-05 Thread xujing
**Describe the bug**
When I use OBS to build rpm, the "rpmsign --addsign" fails, but the manual 
execution succeeds.

When I manually import the private key, I found that user input was required, 
probably because of the gpg version.
```
[root@localhost ~]# gpg2 --import data/keys/*.secret
gpg: key A72B7D4F62837BEA: "Alice Lovelace " not changed
gpg: key A72B7D4F62837BEA: secret key imported
gpg: WARNING: key A72B7D4F62837BEA contains preferences for unavailable
algorithms on these user IDs:
gpg:  "Alice ": preference for compression algorithm 
3
gpg:  "Alice Lovelace ": preference for compression 
algorithm 3
gpg: it is strongly suggested that you update your preferences and
gpg: re-distribute this key to avoid potential algorithm mismatch problems

Set preference list to:
 Cipher: AES256, AES192, AES, 3DES
 AEAD:
 Digest: SHA512, SHA384, SHA256, SHA224, SHA1
 Compression: ZLIB, ZIP, Uncompressed
 Features: MDC, AEAD, Keyserver no-modify
Really update the preferences? (y/N)

Key not changed so no update needed.
gpg: key 4344591E1964C5FC: "rpm.org RSA testkey " not changed
gpg: key 4344591E1964C5FC: secret key imported
gpg: WARNING: key 4344591E1964C5FC contains preferences for unavailable
algorithms on these user IDs:
gpg:  "rpm.org RSA testkey ": preference for compression 
algorithm 3
gpg: it is strongly suggested that you update your preferences and
gpg: re-distribute this key to avoid potential algorithm mismatch problems

Set preference list to:
 Cipher: AES256, AES192, AES, 3DES
 AEAD:
 Digest: SHA512, SHA384, SHA256, SHA224, SHA1
 Compression: ZLIB, ZIP, Uncompressed
 Features: MDC, AEAD, Keyserver no-modify
Really update the preferences? (y/N)

Key not changed so no update needed.
gpg: Total number processed: 2
gpg:  unchanged: 2
gpg:   secret keys read: 2
gpg:  secret keys unchanged: 2
```

In fact, before 
https://github.com/rpm-software-management/rpm/commit/ee2f59cc1770f6eb4493a59710e9ef749725da46
 is mearged, the test case is successful (although gpg still requires user 
input), but after 
https://github.com/rpm-software-management/rpm/commit/ee2f59cc1770f6eb4493a59710e9ef749725da46
 is mearged, the test case fails. 

I found the "*.secret" used in the use case to import the private key, which I 
don't think is very reasonable, because the different-creation-times.secret in 
https://github.com/rpm-software-management/rpm/commit/ee2f59cc1770f6eb4493a59710e9ef749725da46
 is obviously irrelevant to the signature and should explicitly specify the 
private key to use.
https://github.com/rpm-software-management/rpm/blob/c5878f4684aa300c1bdb921bd780ef30d7e5f4cb/tests/rpmsigdig.at#L920

After the test, if rpm.org-rsa-2048-test.secret is specified, the test case can 
be executed successfully in OBS.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3277
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] ELF files left when remove same package in different arch (Issue #1800)

2024-08-29 Thread xujing
ping. Has this issue been fixed? I see that this issue was removed from the 
4.20.0 milestone.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1800#issuecomment-2317423574
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 383: rpm -e and verify conflicting files removed 1 FAILED (rpme.at:327) (Issue #3242)

2024-08-21 Thread xujing
> Oh, I somehow didn't mention the most important part: The reason you're 
> hitting this is most likely because you've configured rpm to use the `ndb` 
> backend (instead of the default `sqlite`). With the former set, this is 
> easily reproducible.

Thank you for your reply. Yes, I am using the ndb database.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3242#issuecomment-2301878675
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] 383: rpm -e and verify conflicting files removed 1 FAILED (rpme.at:327) (Issue #3242)

2024-08-13 Thread xujing
I ran test cases using rpm-4.18.2 and found one test case failed:
```
...
383: rpm -e and verify conflicting files removed 1   FAILED (rpme.at:327)
...
```

I encountered this problem in 4.18.0, but it was too late to provide a 
reproduction method, resulting in the 
issue(https://github.com/rpm-software-management/rpm/issues/2376) being closed.

The steps to reproduce it are as follows:
```
[root@localhost SPECS]# cat conflicttest.spec
# avoid depending on rpm configuration
%define _datadir /usr/share

Name:   conflict%{pkg}
Version:1.0
Release:1
Summary:Testing file conflict behavior

Group:  Testing
License:GPL
BuildArch:  noarch

%description
%{summary}

%install
mkdir -p $RPM_BUILD_ROOT/%{_datadir}
echo "%{filedata}" > $RPM_BUILD_ROOT/%{_datadir}/my.version

%files
%defattr(-,root,root,-)
%{?fileattr} %{_datadir}/my.version
```
1. rpmbuild -bb --quiet --define "pkg a" --define "filedata pkg-a" 
conflicttest.spec
2. rpmbuild -bb --quiet --define "pkg b" --define "filedata pkg-b" 
conflicttest.spec
3. rpm -U --ignoreos /root/rpmbuild/RPMS/noarch/conflicta-1.0-1.noarch.rpm
4. rpm -U --ignoreos --force 
/root/rpmbuild/RPMS/noarch/conflictb-1.0-1.noarch.rpm
5. rpm -Vav --nogroup --nouser conflicta conflictb

I get the following results that do not meet expectations:
```
[root@localhost noarch]# rpm -Vav --nogroup --nouser conflicta conflictb
./usr/share/my.version
./usr/share/my.version (not installed)
```
According to the test cases, the expected results are as follows:
```
[root@localhost noarch]# rpm -Vav --nogroup --nouser conflicta conflictb
./usr/share/my.version (not installed)
./usr/share/my.version
```



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3242
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 363: rpm -e and verify conflicting files removed 1 FAILED (rpme.at:305) (Issue #2376)

2024-07-20 Thread xujing
This may be a bug in 4.18.x, I also reproduced it in 4.18.2. The steps to 
reproduce it are as follows:
```
[root@localhost SPECS]# cat conflicttest.spec
# avoid depending on rpm configuration
%define _datadir /usr/share

Name:   conflict%{pkg}
Version:1.0
Release:1
Summary:Testing file conflict behavior

Group:  Testing
License:GPL
BuildArch:  noarch

%description
%{summary}

%install
mkdir -p $RPM_BUILD_ROOT/%{_datadir}
echo "%{filedata}" > $RPM_BUILD_ROOT/%{_datadir}/my.version

%files
%defattr(-,root,root,-)
%{?fileattr} %{_datadir}/my.version
```
1. rpmbuild -bb --quiet --define "pkg a" --define "filedata pkg-a" 
conflicttest.spec
2. rpmbuild -bb --quiet --define "pkg b" --define "filedata pkg-b" 
conflicttest.spec
3. rpm -U --ignoreos /root/rpmbuild/RPMS/noarch/conflicta-1.0-1.noarch.rpm
4. rpm -U --ignoreos --force 
/root/rpmbuild/RPMS/noarch/conflictb-1.0-1.noarch.rpm
5. rpm -Vav --nogroup --nouser conflicta conflictb

I get the following results that do not meet expectations:
```
[root@localhost noarch]# rpm -Vav --nogroup --nouser conflicta conflictb
./usr/share/my.version
./usr/share/my.version (not installed)
```
According to the test cases, the expected results are as follows:
```
[root@localhost noarch]# rpm -Vav --nogroup --nouser conflicta conflictb
./usr/share/my.version (not installed)
./usr/share/my.version
```



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2376#issuecomment-2241066465
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-02-19 Thread xujing
> You mean 'rpm --verify'? What errors?
No, 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828#issuecomment-1952432415
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-02-19 Thread xujing
Closed #2828 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828#event-11849567215
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-02-07 Thread xujing
I think the database is abnormal because the verification fails when I run the 
rpm command, or the "rpm -qa" command cannot find the kernel package, but the 
"rpm -q" command can find the kernel package. According to the result, the 
problem is caused by the database. However, this does not mean that the problem 
is caused by the internal logic of the database. It may be caused by the sudden 
shutdown, or the /var/ directory is the mount directory.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828#issuecomment-1933290561
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-02-07 Thread xujing
Actually, the ndb database is seldom faulty. There is a high probability that 
the database is abnormal due to abnormal power-off or abnormal mount directory.
If you think it is not appropriate to back up the database, you can consider 
closing the issue.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828#issuecomment-1931615721
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-02-06 Thread xujing
I'm sorry I don't have any good ideas. I just thought of backing up the 
database.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828#issuecomment-1931076797
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-02-06 Thread xujing
Backing up the database is not a perfect solution, but I've been plagued by 
corrupted databases that I can't locate for a long time, and the only solution 
I can think of is to back up the database. It would also be nice if there was 
some other way to deal with possible database issues or something to reduce the 
probability of problems.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828#issuecomment-1929339048
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-02-06 Thread xujing
I'm using ndb database, I often encounter the following problems: 1. The 
problem of verification failure; 2. A rpm package cannot be queried by running 
the "rpm -qa" command, but can be queried by running the "rpm -q" command. 
Sometimes, the "rpm --rebuilddb" command can be used to rectify the fault. 
Sometimes, the "rpm --rebuilddb" command cannot be used.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828#issuecomment-1929324277
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-01-16 Thread xujing
In fact, the most difficult thing is that the database is suddenly damaged, 
generally don't know what caused the damage(may be a power outage or a kill 
process, etc.), so it is difficult to locate and repair.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828#issuecomment-1894789114
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-01-11 Thread xujing
In addition, can we provide a command or script to quickly determine whether 
the database is damaged? At present, there seems to be no concise way to judge, 
generally by `rpm -qa` to roughly judge.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828#issuecomment-1887001193
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-01-02 Thread xujing
Background:
During the daily use of the RPM, the RPM database is abnormal. However, the 
cause is unknown. In some cases, the `rpm --rebuilddb` cannot ensure the 
complete recovery of the database. For recoverability and locatability, I think 
database backup functionality can be added for the following reasons:
1. If the database is abnormal after a command is executed, we can use the 
backup database directory to construct the onsite scenario to facilitate fault 
locating.
2. We can replace the abnormal directory with the normal database that is 
backed up before.

I have a preliminary solution idea:
1. A configuration switch is added to control whether to enable this feature.
2. Add the configuration to determine the location of the backup database 
directory and the number of database directories to run the backup.
3. Back up the database directory after the installation/uninstallation/upgrade 
transaction is complete, and the backup database is controlled by .rpm.lock.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2828
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] When RPM is executed concurrently, there is a possibility that the RPM installation fails due to the rename failure (Issue #2771)

2023-11-20 Thread xujing
If RPM does not allow this scenario, can we consider returning an error in 
advance or optimize the transaction lock? For example, make the transaction 
lock global and not affected by `--dbpath`?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2771#issuecomment-1818890841
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] When RPM is executed concurrently, there is a possibility that the RPM installation fails due to the rename failure (Issue #2771)

2023-11-20 Thread xujing
According to the current code running effect, when one RPM process uses 
`--dbpath` but the other does not, the transaction lock does not seem to work, 
resulting in real concurrent execution.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2771#issuecomment-1818430422
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] When RPM is executed concurrently, there is a possibility that the RPM installation fails due to the rename failure (Issue #2771)

2023-11-18 Thread xujing
According to the preliminary analysis, this problem may be caused by the 
patches for fixing CVE-2021-35939,CVE-2021-35938,CVE-2021-35937. After I roll 
back to the version before fixing CVE-2021-35939,CVE-2021-35938,CVE-2021-35937, 
the problem cannot be reproduced.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2771#issuecomment-1817442315
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] When RPM is executed concurrently, there is a possibility that the RPM installation fails due to the rename failure (Issue #2771)

2023-11-18 Thread xujing
Fedora:
Fedora release 39 (Thirty Nine)

Version:
rpm-4.19.0-1.fc39.aarch64

Reproduction Procedure:
1. mkdir /root/repo && cd repo
2. creating a list of RPM packages to be downloaded:
```
[root@localhost repo]# cat list
abseil-cpp
c-ares
cyrus-sasl-lib
gflags
glibc-common
gnutls
grpc
http-parser
libaio
libarchive
libblkid
libcurl
libepoxy
libgcc
libiscsi
libjpeg-turbo
libpng
libseccomp
libstdc++
libusbx
libwebsockets
lvm2
lxc
lxc-libs
lzo
ncurses-libs
nettle
numactl-libs
openldap
pixman
protobuf
protobuf-compiler
python3-chardet
python3-idna
python3-requests
python3-six
python3-urllib3
rdma-core
re2
snappy
usbredir
yajl
zlib
```
3. for i in `cat list`;do yumdownloader $i; done
4. cd /root && yumdownloader libnl3
5. create some test scripts as follows:
```
[root@localhost ~]# cat install_keepalived.sh
for i in {1..20}
do
rpm -e libnl3 --nodeps
rpm -ivh --nodeps --force --nopre /root/libnl3-3.8.0-2.fc39.aarch64.rpm
done
[root@localhost ~]# cat install_repo.sh
for i in {1..20}
do
rpm -Uhv --nodeps  --force --dbpath=/root/tmpdb /root/repo/*.rpm
done

[root@localhost ~]# cat install.sh
sh install_repo.sh&
sh install_keepalived.sh&
wait

[root@localhost ~]# cat run.sh
for i in {1..1000}
do
  echo "-$i-"
  /root/install.sh > out.log 2>&1
  cat out.log | grep -E "unpacking"
  echo "continue"
done
```
6. sh run.sh

There is a high probability that an unexpected failure occurs. The following 
information is displayed:
```
[root@localhost ~]# sh run.sh
-1-
error: unpacking of archive failed on file /usr/lib64/liblxc.so.1;655871f3: 
cpio: rename failed - Too many levels of symbolic links
error: unpacking of archive failed on file /usr/lib64/libnl-3.so.200;655871fa: 
cpio: rename failed - No such file or directory
continue
-2-

```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2771
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] The RPM is suspended when the uninstallation script is executed (Issue #2738)

2023-10-30 Thread xujing
Closed #2738 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2738#event-10808097119
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] The RPM is suspended when the uninstallation script is executed (Issue #2738)

2023-10-30 Thread xujing
I found that cb6aa82dbc10d554f8d234e934ae7c77e39a3ce2 fixed the problem.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2738#issuecomment-1785249430
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] The RPM is suspended when the uninstallation script is executed (Issue #2738)

2023-10-30 Thread xujing
After the c5f82d3f6223ebd0c5cc0a07ea60393ae7284929 is integrated, the SIGTERM 
signal is blocked. When the installation or uninstallation script is executed, 
the script is suspended if an infinite loop occurs. For example, if the script 
is `"timeout 20 tail --pid=1 -f /dev/null"`. Theoretically, after 20 seconds, 
the timeout command sends a SIGTERM signal to exit, but now the master is 
suspended.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2738
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] rpm core in rpm (Issue #2612)

2023-08-11 Thread xujing


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2612
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] A coredump may occur when the RPM package is installed (Issue #2543)

2023-06-13 Thread xujing
When I try to add a plugin that uses strcmp, a core occurs. The stack is as 
follows:
```
#0 ...
#1 rpmpluginsCallFsmFilePost()
#2 fsmDoMkdir()
#3 ensureDir()
#4 rpmPackageFilesInstall()
#5 rpmpsmUnpack()
...
#13 rpmInstall()
#14 main()
```

I tried to analyze it and found that the second parameter `fi` of 
rpmpluginsCallFsmFilePost() was NULL. As a result, rpmfiDN(fi) returned NULL, 
and abspath() returned NULL. As a result, the third parameter `apath` of 
hookFunc is empty, and a coredump may occur when there is no security check. 
abpath() is introduced in 6dd62720fe84f7e2ad902c915b952fc0b29e3dcd. I found 
that the third parameter of hookFunc is not null before 
6dd62720fe84f7e2ad902c915b952fc0b29e3dcd. I do not understand the processing 
intention when `fi` is null. Is this reasonable?


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2543
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Failed to delete files during the rmbuild execution (Issue #2380)

2023-02-05 Thread xujing
It is confirmed that this problem is caused by 
b34333fa021c0ee7215714eeef96d1a2843ea08e.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2380#issuecomment-1418443920
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Failed to delete files during the rmbuild execution (Issue #2380)

2023-02-05 Thread xujing
When Non-privileged user was used to build the "rpm" package, the file deletion 
failed during the final rmbuild cleanup phase. The problem is caused by the 
lack of write permission on the testing directory.
```
...
[ 209s] Checking for unpackaged file(s): /usr/lib/rpm/check-files 
/home/abuild/rpmbuild/BUILDROOT/rpm-4.18.0-1.oe1.x86_64
[ 209s] Wrote: /home/abuild/rpmbuild/SRPMS/rpm-4.18.0-1.oe1.src.rpm
[ 209s] Wrote: 
/home/abuild/rpmbuild/RPMS/x86_64/rpm-plugin-systemd-inhibit-4.18.0-1.oe1.x86_64.rpm
[ 209s] Wrote: 
/home/abuild/rpmbuild/RPMS/x86_64/rpm-build-4.18.0-1.oe1.x86_64.rpm
[ 209s] Wrote: 
/home/abuild/rpmbuild/RPMS/x86_64/python3-rpm-4.18.0-1.oe1.x86_64.rpm
[ 209s] Wrote: 
/home/abuild/rpmbuild/RPMS/x86_64/rpm-devel-4.18.0-1.oe1.x86_64.rpm
[ 209s] Wrote: 
/home/abuild/rpmbuild/RPMS/x86_64/rpm-libs-4.18.0-1.oe1.x86_64.rpm
[ 209s] Wrote: /home/abuild/rpmbuild/RPMS/x86_64/rpm-4.18.0-1.oe1.x86_64.rpm
[ 209s] Wrote: 
/home/abuild/rpmbuild/RPMS/x86_64/rpm-debugsource-4.18.0-1.oe1.x86_64.rpm
[ 210s] Wrote: 
/home/abuild/rpmbuild/RPMS/x86_64/rpm-debuginfo-4.18.0-1.oe1.x86_64.rpm
[ 210s] Wrote: 
/home/abuild/rpmbuild/RPMS/noarch/rpm-help-4.18.0-1.oe1.noarch.rpm
[ 210s] Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.2fUx5e
[ 210s] + umask 022
[ 210s] + cd /home/abuild/rpmbuild/BUILD
[ 210s] + cd rpm-4.18.0
[ 210s] + /usr/bin/rm -rf 
/home/abuild/rpmbuild/BUILDROOT/rpm-4.18.0-1.oe1.x86_64
[ 210s] + RPM_EC=0
[ 210s] ++ jobs -p
[ 210s] + exit 0
[ 210s] Executing(rmbuild): /bin/sh -e /var/tmp/rpm-tmp.jaZtVz
[ 210s] + umask 022
[ 210s] + cd /home/abuild/rpmbuild/BUILD
[ 210s] + rm -rf rpm-4.18.0 rpm-4.18.0.gemspec
[ 210s] rm: cannot remove 
'rpm-4.18.0/tests/testing/usr/share/locale/br/LC_MESSAGES/rpm.mo': Permission 
denied
[ 210s] rm: cannot remove 
'rpm-4.18.0/tests/testing/usr/share/locale/ko/LC_MESSAGES/rpm.mo': Permission 
denied
[ 210s] rm: cannot remove 
'rpm-4.18.0/tests/testing/usr/share/locale/uk/LC_MESSAGES/rpm.mo': Permission 
denied
...
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2380
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm install failed:error: unpacking of archive failed on file /usr/sbin/aaa;636c6826: cpio: open failed - No such file or directory (Issue #2273)

2023-01-30 Thread xujing
I get the same results as you, without -- force.
```
[root@localhost ~]# rpm -ivh /tmp/test-1.0-1.noarch.rpm
Verifying... # [100%]
Preparing... # [100%]
file /usr/sbin/aaa conflicts between attempted installs of test-1.0-1.noarch 
and test-1.0-1.noarch
[root@localhost ~]#
```
The problem that I described arises when --force is used.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2273#issuecomment-1409647405
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] 363: rpm -e and verify conflicting files removed 1 FAILED (rpme.at:305) (Issue #2376)

2023-01-30 Thread xujing
I tried to manually execute the test case and found that verifying conflicta 
and conflictb alone was as expected.
```
[root@localhost testing]# 
FAKECHROOT_BASE=/root/rpmbuild/BUILD/rpm-4.18.0/tests/rpmtests.dir/363/testing 
fakechroot rpm --define "_buildhost testhost" --define "_topdir /build" 
--noplugins --nouserns -U --ignoreos 
/build/RPMS/noarch/conflicta-1.0-1.noarch.rpm
[root@localhost testing]# 
FAKECHROOT_BASE=/root/rpmbuild/BUILD/rpm-4.18.0/tests/rpmtests.dir/363/testing 
fakechroot rpm --define "_buildhost testhost" --define "_topdir /build" 
--noplugins --nouserns -U --ignoreos --force 
/build/RPMS/noarch/conflictb-1.0-1.noarch.rpm
[root@localhost testing]# 
FAKECHROOT_BASE=/root/rpmbuild/BUILD/rpm-4.18.0/tests/rpmtests.dir/363/testing 
fakechroot rpm --define "_buildhost testhost" --define "_topdir /build" 
--noplugins --nouserns -Vav --nogroup --nouser conflicta
./usr/share/my.version (replaced)
[root@localhost testing]# 
FAKECHROOT_BASE=/root/rpmbuild/BUILD/rpm-4.18.0/tests/rpmtests.dir/363/testing 
fakechroot rpm --define "_buildhost testhost" --define "_topdir /build" 
--noplugins --nouserns -Vav --nogroup --nouser conflictb
./usr/share/my.version
```

In addition, I found that the result of "-V conflicta conflictb" is the same as 
that of "-V conflictb conflicta", which I think may mislead the user about the 
mapping between the output and the rpm package.
```
[root@localhost testing]# 
FAKECHROOT_BASE=/root/rpmbuild/BUILD/rpm-4.18.0/tests/rpmtests.dir/363/testing 
fakechroot rpm --define "_buildhost testhost" --define "_topdir /build" 
--noplugins --nouserns -Vav --nogroup --nouser conflicta conflictb
./usr/share/my.version
./usr/share/my.version (replaced)
[root@localhost testing]# 
FAKECHROOT_BASE=/root/rpmbuild/BUILD/rpm-4.18.0/tests/rpmtests.dir/363/testing 
fakechroot rpm --define "_buildhost testhost" --define "_topdir /build" 
--noplugins --nouserns -Vav --nogroup --nouser conflictb conflicta
./usr/share/my.version
./usr/share/my.version (replaced)
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2376#issuecomment-1409644223
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] 363: rpm -e and verify conflicting files removed 1 FAILED (rpme.at:305) (Issue #2376)

2023-01-30 Thread xujing
I ran test cases using rpm-4.18.0 and found one test case failed:
```
...
357: rpm -e and shared files removed 1.1 ok
358: rpm -e and shared files removed 1.2 ok
359: rpm -e and verify colored files removed 1.1 ok
360: rpm -e and verify colored files removed 1.2 ok
361: rpm -e and verify colored files removed 2.1 expected failure 
(rpme.at:216)
362: rpm -e and verify colored files removed 2.2 expected failure 
(rpme.at:241)
363: rpm -e and verify conflicting files removed 1   FAILED (rpme.at:305)
364: rpm -e and verify netshared files not removed   ok

RPM install/erase ordering

365: basic install/erase order 1 ok
366: basic install/erase order 2 ok
367: basic install/erase order 3 ok
...
```

The rpmtests.log is as follows:
```
[root@localhost testing]# cat ../rpmtests.log
# -*- compilation -*-
363. rpme.at:261: testing rpm -e and verify conflicting files removed 1 ...
./rpme.at:271:
runroot rpm -U --ignoreos /build/RPMS/noarch/conflicta-1.0-1.noarch.rpm
runroot rpm -U --ignoreos --excludepath=/usr/share 
/build/RPMS/noarch/conflictb-1.0-1.noarch.rpm
runroot rpm -Vav --nogroup --nouser conflicta conflictb
runroot rpm -e conflicta
runroot rpm -Vav --nogroup --nouser conflictb
runroot rpm -e conflictb
runroot rpm -Vp --nogroup --nouser /build/RPMS/noarch/conflictb-1.0-1.noarch.rpm

./rpme.at:288:
runroot rpm -U --ignoreos --excludepath=/usr/share 
/build/RPMS/noarch/conflicta-1.0-1.noarch.rpm
runroot rpm -U --ignoreos /build/RPMS/noarch/conflictb-1.0-1.noarch.rpm
runroot rpm -Vav --nogroup --nouser conflicta conflictb
runroot rpm -e conflicta
runroot rpm -Vav --nogroup --nouser conflictb
runroot rpm -e conflictb
runroot rpm -Vp --nogroup --nouser /build/RPMS/noarch/conflictb-1.0-1.noarch.rpm

./rpme.at:305:
runroot rpm -U --ignoreos /build/RPMS/noarch/conflicta-1.0-1.noarch.rpm
runroot rpm -U --ignoreos --force /build/RPMS/noarch/conflictb-1.0-1.noarch.rpm
runroot rpm -Vav --nogroup --nouser conflicta conflictb
runroot rpm -e conflicta
runroot rpm -Vav --nogroup --nouser conflictb
runroot rpm -e conflictb
runroot rpm -Vp --nogroup --nouser /build/RPMS/noarch/conflictb-1.0-1.noarch.rpm

--- -   2023-01-30 12:01:25.406628451 +
+++ /root/rpmbuild/BUILD/rpm-4.18.0/tests/rpmtests.dir/at-groups/363/stdout 
2023-01-30 12:01:25.40400 +
@@ -1,5 +1,5 @@
-./usr/share/my.version (replaced)
 ./usr/share/my.version
+./usr/share/my.version (replaced)
 ./usr/share/my.version
 missing /usr/share/my.version

363. rpme.at:261: 363. rpm -e and verify conflicting files removed 1 
(rpme.at:261): FAILED (rpme.at:305)
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2376
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Use the real user/group name in BUILDROOT if we set %attr(-, -, -) explicitly (Issue #1933)

2022-12-14 Thread xujing
I reconfirmed the rpmrebuild code. The spec file automatically generated by 
rpmrebuild does not configure defattr. It seems that this scenario does not 
exist unless manually configured.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1933#issuecomment-1352503592
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm install failed:error: unpacking of archive failed on file /usr/sbin/aaa;636c6826: cpio: open failed - No such file or directory (Issue #2273)

2022-12-14 Thread xujing
I tried to modify the %install and the installation still failed, but it was 
due to symlink failure.
```
%install
mkdir %{buildroot}/sbin/
touch %{buildroot}/sbin/aaa

%if %{with sbinsymlinks}
mkdir -p %{buildroot}/usr/sbin/
cd %{buildroot}/usr/sbin/
ln -sv ../../sbin/aaa .
%endif
```
```
[root@localhost SPECS]# rpm -ivh 
/root/rpmbuild/RPMS/noarch/test-1.0-1.noarch.rpm --force
Verifying...  # [100%]
Preparing...  # [100%]
Updating / installing...
   1:test-1.0-1   # [100%]
error: unpacking of archive failed on file /usr/sbin/aaa;639a7f70: cpio: 
**symlink failed - No such file or directory**
error: test-1.0-1.noarch: install failed
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2273#issuecomment-1352470844
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm install failed:error: unpacking of archive failed on file /usr/sbin/aaa;636c6826: cpio: open failed - No such file or directory (Issue #2273)

2022-12-14 Thread xujing
When I tried to fix it with the following patch, the `openat(dirfd, dest, 
O_WRONLY|O_CREAT, 0200)` still failed with a message "No such file or 
directory". In this case, the open does not seem to cover this scenario.
```
diff --git a/lib/fsm.c b/lib/fsm.c
index c9ab3e1..4ceca3d 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -282,6 +282,12 @@ static int fsmOpen(int *wfdp, int dirfd, const char *dest)
 /* Create the file with 0200 permissions (write by owner). */
 int fd = openat(dirfd, dest, O_WRONLY|O_EXCL|O_CREAT, 0200);
 
+if (fd < 0 && errno == EEXIST) {
+   rpmlog(RPMLOG_WARNING, "xujing: %8s (%s [%d]) %s\n", __func__,
+  dest, fd, (rc < 0 ? strerror(errno) : ""));
+   fd = openat(dirfd, dest, O_WRONLY|O_CREAT, 0200);
+}
+
 if (fd < 0)
rc = RPMERR_OPEN_FAILED;
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2273#issuecomment-1352469285
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks when running rpmbuild (PR #2293)

2022-12-08 Thread xujing
Yes, I agree with you. When there are too many submissions in a PR, one 
problematic submission will block other submissions. Considering that the 
repair code is simple and is a leak problem of rpmbuild, I put them in a PR to 
prevent too many PRs.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293#issuecomment-1342560183
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks when running rpmbuild (PR #2293)

2022-12-08 Thread xujing
> > When `checkSep(EVR, '-', emsg)` or `checkSep(EVR, ':', emsg)` or 
> > `checkEpoch(EVR, emsg)` returns RPMRC_FAIL, and 
> > `_wrong_version_format_terminate_build` is defined as 0, the checkDep() 
> > will returns RPMRC_OK and emsg is set.
> 
> Oh, indeed. We could just remove _wrong_version_format_terminate_build, that 
> has long since served its purpose, but then I spotted another case where this 
> happens: the "it's not recommended to have..." warning messages.
> 
> In both these cases a warning will get swallowed in case of an error, that's 
> not a sane behavior even if the leak was fixed. This will need something 
> rather different, please drop that particular commit from this series to let 
> us move forward with the simpler cases. (that's always the gotcha with 
> multiple unrelated commits in a PR: any one of them can stop the whole thing)

I agree with you that even if the leak is fixed, there are still other 
problems, and I've deleted the corresponding submission,

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293#issuecomment-1342559737
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks when running rpmbuild (PR #2293)

2022-12-08 Thread xujing
@JetXujing commented on this pull request.



> @@ -276,7 +279,11 @@ static int doBuildRequires(rpmSpec spec, int test)
 
  exit:
 freeStringBuf(sb_stdout);
-free(output);
+if (output) {

Thank you for the tip, I've made the relevant changes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293#discussion_r1043237603
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks when running rpmbuild (PR #2293)

2022-12-08 Thread xujing
@JetXujing pushed 5 commits.

ae4e1fad3c30beae27b53721e048c8ca9d7fcf52  Fix BANames leak in handlePreambleTag
b1c328fae840ee5553df9d85d59dc4f8426abda5  Fix prog leak in parseScript
ac5b93c101ffeb83f72357b59d86810b5197de8c  Fix elf leak in getElfColor
e9bf10bda8fd211bdce46a96fbb9d4f41717a608  Fix *sbp leak when running rpmbuild 
with --quiet
d07743e093841809add60b85953b5b6bb8794632  Fix memleak when running 
%generate_buildrequires

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293/files/76fa5ee9a4b55bcb9498b084471b2bf86d28a0c0..d07743e093841809add60b85953b5b6bb8794632
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks when running rpmbuild (PR #2293)

2022-12-08 Thread xujing
@JetXujing pushed 1 commit.

76fa5ee9a4b55bcb9498b084471b2bf86d28a0c0  Fix memleak when running 
%generate_buildrequires

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293/files/63d6d70d869296fd8fe95bd73466bed6ae72a133..76fa5ee9a4b55bcb9498b084471b2bf86d28a0c0
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] File conflicts: Symlinked directories -> same file replaced by real directories -> unique files (#1458)

2022-12-07 Thread xujing
In the latest version, the RPM file installation is reconstructed. Can you 
confirm whether the latest version involves this problem or provide detailed 
reproduction steps.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1458#issuecomment-1340586937
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] conditional builds with underscrore don't have _without option (Issue #1929)

2022-12-06 Thread xujing
https://github.com/rpm-software-management/rpm/pull/1256 and https 
://github.com/rpm-software-management/rpm/blob/master/docs/manual/conditionalbuilds.md
 have explained in detail whether this issue can be closed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1929#issuecomment-1340510920
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add options check in rpm2archive (PR #2312)

2022-12-05 Thread xujing
I tested it locally and it works as expected.
```
[root@localhost ~]# rpm2archive --nosuch
rpm2archive: --nosuch: unknown option
[root@localhost ~]#
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2312#issuecomment-1338905513
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Add options check in rpm2archive (PR #2312)

2022-12-05 Thread xujing
rpm2archive doesn't have any checking for legitimate command line which may 
cause rpm2archive blocked. Adding options  check in rpm2archive now. For 
details, see https://github.com/rpm-software-management/rpm/issues/2210.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2312

-- Commit Summary --

  * Add options check in rpm2archive

-- File Changes --

M rpm2archive.c (16)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2312.patch
https://github.com/rpm-software-management/rpm/pull/2312.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2312
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memory and file leak in some cases when running "rpm -i" (PR #2311)

2022-12-05 Thread xujing
@JetXujing pushed 1 commit.

148528244a9b8843c412422d8d2ba6be92454fc0  Fix fileleak when urlGetFile fails in 
rpmInstall

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2311/files/2a9888ff2ea73314b294e8e271b3e698de999205..148528244a9b8843c412422d8d2ba6be92454fc0
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memory and file leak in some cases when running "rpm -i" (PR #2311)

2022-12-05 Thread xujing
@JetXujing pushed 1 commit.

3c34043f4e519e3010c120f10f39cc2f4eeeb52f  Fix fileleak when urlGetFile fails in 
rpmInstall

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2311/files/148528244a9b8843c412422d8d2ba6be92454fc0..3c34043f4e519e3010c120f10f39cc2f4eeeb52f
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Fix memory and file leak in some cases when running "rpm -i" (PR #2311)

2022-12-05 Thread xujing
Fix memory and file leak in some cases when running "rpm -i".
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2311

-- Commit Summary --

  * Fix memleak when fsmRename failed in fsmCommit
  * Fix fileleak and memleak in rpmInstall
  * Fix fileleak when urlGetFile fails in rpmInstall

-- File Changes --

M lib/fsm.c (3)
M lib/rpminstall.c (17)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2311.patch
https://github.com/rpm-software-management/rpm/pull/2311.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2311
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix rpm is blocked when install a package which contains fifo files (PR #2261)

2022-12-04 Thread xujing
Are there any other problems? Please review it. Thanks.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2261#issuecomment-1336814748
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix Header leak when running rpm2cpio (PR #2304)

2022-12-02 Thread xujing
Are there any other questions? Please review them. Thanks

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2304#issuecomment-1335165897
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks when running rpmbuild (PR #2293)

2022-12-02 Thread xujing
Are there any other questions? Please review them. Thanks

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293#issuecomment-1335165690
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpmdb --exportdb does not work on read-only fs (#1266)

2022-11-30 Thread xujing
Is there any solution to fix the problem? If not, can we consider adding 
information description in rpm?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1266#issuecomment-1333121955
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm --delsign changes the arch element of the lead (#1326)

2022-11-30 Thread xujing
I mean, rpm can consider copying lead instead of regenerating lead which seems 
can be worked fine.
The other way, I think we can add documentation to explain it, because few 
people pay attention to lead and lead has no actual effect, so it is OK not to 
modify it.

Is there any other good way?@pmatilai 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1326#issuecomment-1333014142
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm --delsign changes the arch element of the lead (#1326)

2022-11-30 Thread xujing
> See the comment in rpmLeadFromHeader (as I wrote):
> 
> ```
> /* FIXME: should grab these from header instead (RhBug:717898) */
> rpmGetArchInfo(NULL, &archnum);
> rpmGetOsInfo(NULL, &osnum);
> ```
> 
> So you'll get the arch from the host where you created or deleted a 
> signature, and not the arch from the host that built the package.

Thanks for the reply, I know what you mean, this does seem to be a problem. But 
why not consider copying the lead data word for word when creating or deleting 
signatures? Is there any other problem?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1326#issuecomment-1332068202
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm --delsign changes the arch element of the lead (#1326)

2022-11-30 Thread xujing
> copies over the lead data verbatim when creating or deleting signatures

Thanks for the reply, I know what you mean, this does seem to be a problem. But 
why not consider copying the lead data word for word when creating or deleting 
signatures? Is there any other problem?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1326#issuecomment-1332067706
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm --delsign changes the arch element of the lead (#1326)

2022-11-30 Thread xujing
The arch element does not exist because the name in rpmlead_s is obtained from 
`headerGetAsString(h, RPMTAG_NEVR)` in rpmLeadFromHeader and  arch element is 
not saved. In addition, 3255273ae0fabd03c9738249a29c9c1e15f28f6 seems fine, and 
I don't quite understand how the arch element is changed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1326#issuecomment-1332040369
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Use the real user/group name in BUILDROOT if we set %attr(-, -, -) explicitly (Issue #1933)

2022-11-30 Thread xujing
> I think we should update the documentation to indicate what it actually does 
> (`%attr` overrides `%defattr`, it doesn't indicate it won't change anything).

Do you want to express %defattr overrides %attr?

I think we can consider %attr overwriting %defattr, and this problem seems to 
be solved. Or we can also add documentation indicating that %defattr will 
overwrite %attr. If attr(-, -, -) is used, check whether attr(-, -, -) will be 
overwritten.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1933#issuecomment-1331771472
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix Header leak when running rpm2cpio (PR #2304)

2022-11-29 Thread xujing
> The OS will clean up all manner of other things too, but still we close those 
> file descriptors etc anyway. I certainly prefer leak-free exit even on simple 
> non-looping command line tools.

I totally agree with that. Although the OS automatically cleans up, leaks can 
be ignored to some extent as long as they are not resident processes, which is 
obviously not a good code.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2304#issuecomment-1330388697
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Fix Header leak when running rpm2cpio (PR #2304)

2022-11-28 Thread xujing
Header "h" is alloced in rpmReadPackageFile but not freed when 
running rpm2cpio. Fix it.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2304

-- Commit Summary --

  * Fix Header leak when running rpm2cpio

-- File Changes --

M rpm2cpio.c (2)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2304.patch
https://github.com/rpm-software-management/rpm/pull/2304.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2304
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive doesn't check command line switches (Issue #2210)

2022-11-28 Thread xujing
Can we add processing similar to rpmkeys: Check whether the option is 
supported, if not, print related information and exit. 
I'd be happy to contribute if it's available.
```
[root@localhost ~]# rpmkeys --nosuch
rpmkeys: --nosuch: unknown option
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2210#issuecomment-1328983188
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks when running rpmbuild or rpm2cpio (PR #2293)

2022-11-28 Thread xujing
@JetXujing pushed 6 commits.

0fcd5d6032cab4e3b124decae76988eeed9af8cf  Fix BANames leak in handlePreambleTag
c564b1b988f57f481895f3e4cad203dbbe9b4b99  Fix emsg leak in parseRCPOT
05959b6a43a0fd316499d25e12f4a1f31dc09caf  Fix prog leak in parseScript
3233e97615bedfa771ee41363330968e71260a1a  Fix elf leak in getElfColor
8ccf8e718d7d9a3b506f72a6ee72ac714c4dcca9  Fix *sbp leak when running rpmbuild 
with --quiet
63d6d70d869296fd8fe95bd73466bed6ae72a133  Fix memleak when running 
%generate_buildrequires

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293/files/b86f687a047906e6561aed1faf1dad078073d949..63d6d70d869296fd8fe95bd73466bed6ae72a133
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix some resource leaks when running rpmbuild or rpm2cpio (PR #2293)

2022-11-28 Thread xujing
> Didn't look at the patches too closely yet, but:
> 
> * Please capitalize commit messages properly, including the summary line. As 
> in, start sentences with a capital letter.
> * Avoid piling on large number of commits to a single PR, it makes reviewing 
> harder even if they're just tiny one-liners. Not every one-liner needs a 
> separate PR and there's no hard line, but this is certainly at the upper 
> limit already.
> * If something needs more than one or two frees, it needs a different 
> approach entirely (eg the sbp leak here)

The leaked scenarios are different and independent. Is it clearer to submit and 
fix a scenario separately?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293#issuecomment-1328695672
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] The time zone set by the %changelog does not take effect. (Issue #2253)

2022-11-27 Thread xujing
Closed #2253 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2253#event-7900136815
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix some resource leaks when running rpmbuild or rpm2cpio (PR #2293)

2022-11-27 Thread xujing
@JetXujing pushed 1 commit.

b86f687a047906e6561aed1faf1dad078073d949  fix memleak when running 
%generate_buildrequires

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293/files/9b55215c72a5e6209d530d9bf237c0c5e015febc..b86f687a047906e6561aed1faf1dad078073d949
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix some resource leaks when running rpmbuild or rpm2cpio (PR #2293)

2022-11-25 Thread xujing
@JetXujing pushed 1 commit.

9b55215c72a5e6209d530d9bf237c0c5e015febc  fix *sbp leak when running rpmbuild 
with --quiet

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293/files/3986afaef7859503da09f942cfcb89d775fb8307..9b55215c72a5e6209d530d9bf237c0c5e015febc
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix some resource leaks when running rpmbuild or rpm2cpio (PR #2293)

2022-11-25 Thread xujing
@JetXujing pushed 1 commit.

5a8297fbc57cf74537e0821e58560434ea1e43ad  fix *sbp leak when running rpmbuild 
with --quiet

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293/files/d7a90cad20c6a651c36f4201079124067b04d6b9..5a8297fbc57cf74537e0821e58560434ea1e43ad
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix some resource leaks when running rpmbuild or rpm2cpio (PR #2293)

2022-11-25 Thread xujing
> > "emsg" is leaked in some cases when running rpmbuild, because "emsg"
> > may be alloced and be set when checkDep returns RPMRC_OK.
> 
> If emsg is allocated when checkDep() returns without an error, then perhaps 
> _that_ should be fixed instead I think. What's the case where that happens, I 
> didn't see anything immediately obvious there?

When `checkSep(EVR, '-', emsg)` or `checkSep(EVR, ':', emsg)` or 
`checkEpoch(EVR, emsg)` returns RPMRC_FAIL, and 
`_wrong_version_format_terminate_build` is defined as 0, the checkDep() will 
returns RPMRC_OK and emsg is set.
```
if (checkSep(EVR, '-', emsg) != RPMRC_OK ||
checkSep(EVR, ':', emsg) != RPMRC_OK ||
checkEpoch(EVR, emsg) != RPMRC_OK) {

if (rpmExpandNumeric("%{?_wrong_version_format_terminate_build}"))
return RPMRC_FAIL;
}
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293#issuecomment-1327336296
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] fix some resource leaks when running rpmbuild or rpm2cpio (PR #2293)

2022-11-25 Thread xujing
fix some resource leaks in some cases when running rpmbuild or rpm2cpio.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2293

-- Commit Summary --

  * fix BANames leak in handlePreambleTag
  * fix emsg leak in parseRCPOT
  * fix prog leak in parseScript
  * fix elf leak in getElfColor
  * fix Header leak when running rpm2cpio

-- File Changes --

M build/parsePreamble.c (1)
M build/parseReqs.c (10)
M build/parseScript.c (3)
M build/rpmfc.c (3)
M rpm2cpio.c (2)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2293.patch
https://github.com/rpm-software-management/rpm/pull/2293.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2293
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks during installation (PR #2289)

2022-11-24 Thread xujing
@JetXujing commented on this pull request.



> @@ -241,6 +241,8 @@ Header headerFree(Header h)
}
h->index = _free(h->index);
 }
+if (h->blob)

Thank you for your comments. I've made changes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2289#discussion_r1031937585
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks during installation (PR #2289)

2022-11-24 Thread xujing
> You can't reference some local files in the commit message ([fix file leak 
> when install src rpm which is 
> URL](https://github.com/rpm-software-management/rpm/pull/2289/commits/3938cefacedbfd1ae40ff356c9d8d43e173da902)).
>  You need to include the content if it is appropriate. Or describe the issue.

Thank you for your comments. I've made changes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2289#issuecomment-1326934576
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix some resource leaks during installation (PR #2289)

2022-11-24 Thread xujing
@JetXujing pushed 2 commits.

310bad24176e0213af7e5333de491abb1c3a5e81  fix file leak when src rpm in URL 
format is used for installation
b70d28c65e88afe96f4ce6085aa476e4d173f826  fix h->blob leak when install src rpm

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2289/files/7a02e7d64415f143e8d92a41c3fcc993d28a7a5c..b70d28c65e88afe96f4ce6085aa476e4d173f826
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix some leaks in rpmInstall (PR #2289)

2022-11-24 Thread xujing
@JetXujing pushed 2 commits.

3938cefacedbfd1ae40ff356c9d8d43e173da902  fix file leak when install src rpm 
which is URL
374adb562e29c1ad736e39e07dd859decb0cd5e9  fix h->blob leak when install src rpm

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2289/files/1e973b5027479f2c356964be393084cfeae3db87..374adb562e29c1ad736e39e07dd859decb0cd5e9
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix some leaks in rpmInstall (PR #2289)

2022-11-23 Thread xujing
> > @pmatilai PTAL
> 
> All PR's will get looked at, in time. Please avoid these kind of personal 
> pings unless it's actually personal, ie there's something that requires a 
> response from that person specifically.

I'm sorry. I'll follow this rule in the future.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2289#issuecomment-1326004853
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix Header leak in rpmInstall (PR #2289)

2022-11-23 Thread xujing
@JetXujing pushed 1 commit.

23f92b49b757f1449f6889bdcce2f5e40f613b71  fix eiu->sourceURL leak in rpmInstall

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2289/files/12ecef95db39c45f3f70cb20e63e2ebb7560f222..23f92b49b757f1449f6889bdcce2f5e40f613b71
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix Header leak in rpmInstall (PR #2289)

2022-11-23 Thread xujing
@pmatilai PTAL

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2289#issuecomment-1325906444
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] fix Header leak in rpmInstall (PR #2289)

2022-11-23 Thread xujing
when rpm install a package, the Header from tryReadHeader in rpmInstall is 
leaked.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2289

-- Commit Summary --

  * fix Header leak in rpmInstall

-- File Changes --

M lib/rpminstall.c (4)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2289.patch
https://github.com/rpm-software-management/rpm/pull/2289.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2289
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix rpm is blocked when open fifo file (PR #2261)

2022-11-22 Thread xujing
@ffesti PTAL

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2261#issuecomment-1324462841
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] The patch file is lost in src.rpm in some cases. (Issue #2282)

2022-11-21 Thread xujing
The spec file may contain the following information:
![image](https://user-images.githubusercontent.com/43668249/203216404-eb0ea2ea-b068-48ff-9196-c70427a71cb6.png)

if "xxx" is not defined, the aaa.patch will not be packed into src.rpm. When I 
download the src.rpm and build in an environment where "xxx" is defined, the 
build fails, and a message is displayed indicating that there is no aaa.patch.

I think it's reasonable that thesrc.rpm should pack all the files in the 
SOURCES directory.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2282
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix rpm is blocked when open fifo file (PR #2261)

2022-11-17 Thread xujing
@JetXujing pushed 1 commit.

84ecb642ef5965fd3dc565b1299f39a3aea74a49  fix rpm is blocked when open fifo file

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2261/files/cd361d59bd2ce67f38631f817001e0cda437f24b..84ecb642ef5965fd3dc565b1299f39a3aea74a49
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fix rpm is blocked when open fifo file (PR #2261)

2022-11-17 Thread xujing
> Commit message should probably give a bit more background. It should mention 
> the ticket it fixes but not rely on the information in the ticket still being 
> available.

Thanks for your reply, I've added commit message

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2261#issuecomment-1318464893
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] The time zone set by the %changelog does not take effect. (Issue #2253)

2022-11-16 Thread xujing
Thank you for your reply, based on the 
https://github.com/rpm-software-management/rpm/pull/739 discussion, it doesn't 
seem necessary to revise it.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2253#issuecomment-1316867537
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-15 Thread xujing
@JetXujing commented on this pull request.



> @@ -1371,3 +1371,21 @@ runroot rpm -q --whatprovides /
 ],
 [])
 AT_CLEANUP
+
+AT_SETUP([rpm -U with Obsoletes])
+AT_KEYWORDS([install])
+AT_CHECK([
+RPMDB_INIT
+
+runroot rpmbuild -bb --quiet /data/SPECS/test-obsoletes.spec
+runroot rpm -i --nodeps --ignorearch /data/RPMS/hello-1.0-1.i386.rpm
+runroot rpm -U /build/RPMS/noarch/test-obsoletes-1.0-1.noarch.rpm

Oh, I understand what you mean, and it's now been revised.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2254#discussion_r1022657747
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-15 Thread xujing
@JetXujing pushed 1 commit.

caa146ce57e85fd85161e184dff8fb232e742123  tests: add test for Obsoletes

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2254/files/1275994c92b1cfb4831d285fc12dd2ef2aa514d3..caa146ce57e85fd85161e184dff8fb232e742123
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm install block file will load brd modules automatically (Issue #2275)

2022-11-10 Thread xujing
The brd module is automatically loaded after fsmOpenat() the block file.
```
if (!rc && fd == -1 && !S_ISLNK(fp->sb.st_mode)) {
/* Only follow safe symlinks, and never on temporary files */
fd = fsmOpenat(di.dirfd, fp->fpath,
fp->suffix ? AT_SYMLINK_NOFOLLOW : 0, 0);
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2275#issuecomment-1311191497
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] rpm install block file will load brd modules automatically (Issue #2275)

2022-11-10 Thread xujing
I have a spec as follows:
[root@localhost SPECS]# cat test.spec
```
Name: test
Version: 1.0
Release: 1
Group: Testing
License: GPL
Summary: Simple rpm demonstration.

%description
Simple rpm demonstration.

%prep

%build

%install
mknod %{buildroot}/test-block b 1 2

%files
/test-block
```

1. `rpmbuild -bb test.spec`
2. `rmmod brd`
3. `rpm -i /root/rpmbuild/RPMS/aarch64/test-1.0-1.aarch64.rpm --force`
4. `lsmod | grep brd`

According to the preceding steps, the following output can be obtained:
```
[root@localhost SPECS]# lsmod | grep brd
brd20480  0
```

Is it reasonable that the brd module is automatically loaded when the block 
file is installed?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2275
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


  1   2   >