diff --git "a/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/openssh.md" "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/openssh.md" new file mode 100644 index 0000000000000000000000000000000000000000..049d40797132436a224f0fe424f318094a5b4f39 --- /dev/null +++ "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/openssh.md" @@ -0,0 +1,30 @@ +openssh +rsa和ecdsa缺少头文件 +#include "ssh-pkcs11.h" + +%patch后面不能直接跟数字,要空一格 + +%check +if [ -e /sys/fs/selinux/enforce ]; then + # Store the SElinux state only if the file exists + if [ -w /sys/fs/selinux/enforce ] && [ -w. ]; then + cat /sys/fs/selinux/enforce > selinux.tmp + setenforce 0 + else + echo "Insufficient permissions to handle SELinux state. Skipping modification." + fi +else + echo "SELinux is not enabled or enforce file not found. Skipping modification." +fi + +make tests + +if [ -e /sys/fs/selinux/enforce ]; then + # Restore the SElinux state only if the file exists + if [ -w /sys/fs/selinux/enforce ] && [ -f selinux.tmp ]; then + cat selinux.tmp > /sys/fs/selinux/enforce + rm -rf selinux.tmp + else + echo "Insufficient permissions or temp file not found. Skipping restoration of SELinux state." + fi +fi \ No newline at end of file diff --git "a/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/pkcs11-helper.md" "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/pkcs11-helper.md" new file mode 100644 index 0000000000000000000000000000000000000000..981603377da890fa13da0a091b53334e37264649 --- /dev/null +++ "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/pkcs11-helper.md" @@ -0,0 +1,28 @@ +###软件包pkcs11-helper: + +#错误: + +1.aarch64: + +[ 101s] pkcs11h-openssl.c:1108:3: error: incompatible function pointer types passing 'int (CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int, long, void *)' (aka 'int (struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int, long, void *)') to parameter of type 'CRYPTO_EX_dup *' (aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int, long, void *)') [-Wincompatible-function-pointer-types] +[ 101s] 1108 | __pkcs11h_openssl_ex_data_dup, +[ 101s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[ 101s] /usr/include/openssl/rsa.h:444:62: note: expanded from macro 'RSA_get_ex_new_index' +[ 101s] 444 | CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, l, p, newf, dupf, freef) +[ 101s] | ^~~~ + +2.x86: + +同上 + +#错误解释: + +这个错误表明在 pkcs11h-openssl.c 文件的第 1108 行,传递的函数指针类型与期望的类型不兼容。 + +具体来说,正在尝试将函数 __pkcs11h_openssl_ex_data_dup 的指针传递给一个期望类型为 CRYPTO_EX_dup *(即 int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int, long, void *))的参数,但 __pkcs11h_openssl_ex_data_dup 的类型是 int (CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int, long, void *)(等同于 int (struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int, long, void *))。 + +即__pkcs11h_openssl_ex_data_dup函数定义的第三个参数有问题: +需要的是void ** +结果传递的是void * + +社区已修复 \ No newline at end of file diff --git "a/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/python-dmidecode.md" "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/python-dmidecode.md" new file mode 100644 index 0000000000000000000000000000000000000000..8d7ada385cffb99cb6947d26a1e7d1dfab284ccd --- /dev/null +++ "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/python-dmidecode.md" @@ -0,0 +1,33 @@ +软件包python-dmidecode + +#错误: + +aarch: + +1.[ 75s] src/dmidecodemodule.c:916:28: error: incompatible function pointer types initializing 'PyCFunction' (aka 'struct _object *(*)(struct _object *, struct _object *)') with an expression of type 'PyObject *(PyObject *, PyObject *, PyObject *)' (aka 'struct _object *(struct _object *, struct _object *, struct _object *)') [-Wincompatible-function-pointer-types] +[ 75s] 916 | {(char *)"xmlapi", dmidecode_xmlapi, METH_VARARGS | METH_KEYWORDS, +[ 75s] | ^~~~~~~~~~~~~~~~ + +即不兼容的函数指针类型错误: +在第 916 行,尝试将一个函数指针类型为PyObject *(PyObject *, PyObject *, PyObject *)的表达式初始化为PyCFunction类型(即struct _object *(*)(struct _object *, struct _object *))。这意味着函数的参数个数不匹配,一个接受三个参数,一个只接受两个参数。 + +#解决方法 +对于第一个错误,是因为函数指针类型不匹配导致的。PyCFunction期望的函数指针类型是接受两个PyObject*参数的函数指针,而dmidecode_xmlapi接受三个PyObject*参数。 +要解决这个问题,可以考虑以下这种方法: +调整函数定义 +修改dmidecode_xmlapi函数的定义,使其只接受两个PyObject*参数。这可能需要重新设计函数的逻辑,以适应参数的减少。 + +2.[ 75s] src/dmidecodemodule.c:1027:72: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'PyCapsule_Destructor' (aka 'void (*)(struct _object *)') [-Wincompatible-function-pointer-types] +[ 75s] 1027 | PyModule_AddObject(module, "options", PyCapsule_New(opt, NULL, destruct_options)); +[ 75s] | ^~~~~~~~~~~~~~~~ + +即这个错误表明在将一个函数指针作为PyCapsule的析构函数传递时,函数指针类型不兼容。 +具体来说,错误发生在src/dmidecodemodule.c文件的第 1027 行,尝试将一个类型为void (void *)的函数指针传递给期望类型为PyCapsule_Destructor(即void (*)(struct _object *))的参数。 + +#解决方法: +检查传递给PyCapsule_New的析构函数destruct_options的定义,确保它的参数类型与PyCapsule_Destructor期望的类型一致。如果不一致,需要修改析构函数的定义,使其接受一个struct _object *类型的参数。 + +3.解决完前两个出现的问题: +482行的typeid是char*类型,需要int类型的,格式转换即可 + +#问题都解决完之后只有最后的报错,没有具体的报错 \ No newline at end of file diff --git "a/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/rarian.md" "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/rarian.md" new file mode 100644 index 0000000000000000000000000000000000000000..78331cff8e5f63b0c02b25797dec43824ae0f745 --- /dev/null +++ "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/rarian.md" @@ -0,0 +1,11 @@ +rarian + +错误:[ 79s] rarian-example.c:80:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] +[ 79s] 80 | info_for_each (RrnInfoEntry *entry, void *data) +[ 79s] | ^ +[ 79s] | int + +即rarian-example.c 文件的第 80 行,定义函数时没有明确指定函数的返回类型,编译器默认认为是 int,但在 ISO C99 及更高版本中不支持这种隐式的 int 类型声明。 +要解决这个问题,可以在函数定义处明确指定函数的返回类型。 + +只要在函数前加一个int即可 \ No newline at end of file diff --git "a/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/satyr.md" "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/satyr.md" new file mode 100644 index 0000000000000000000000000000000000000000..39b9ed2475e56be7be5d9b106dc061e7860c75f2 --- /dev/null +++ "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/satyr.md" @@ -0,0 +1,12 @@ +satyr +问题: +FAIL: core_stacktrace +上游已修复 +https://github.com/abrt/satyr/pull/340 + +但是在obs中的x86架构下还是FAIL: core_stacktrace +经过测试加上 +%if "%toolchain" == "clang" + export CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument" +%endif +即可通过,而这在后续会加上,因此当做社区已修复 \ No newline at end of file diff --git "a/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/sysstat.md" "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/sysstat.md" new file mode 100644 index 0000000000000000000000000000000000000000..e3aa0b1cfa8d9f6265d614296f6f903865e95c45 --- /dev/null +++ "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/sysstat.md" @@ -0,0 +1,11 @@ +sysstat + +问题: + +[ 72s] rd_stats.c:995:4: error: non-void function 'read_tty_driver_serial' should return a value [-Wreturn-type] +[ 72s] 995 | return; +[ 72s] | ^ + +上一个人提交的patch里,return后面没有返回值 + +在return后面加上返回值0即可解决问题 \ No newline at end of file diff --git "a/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/trace-cmd.md" "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/trace-cmd.md" new file mode 100644 index 0000000000000000000000000000000000000000..d85ece6c4ec613bbe6e68bf9461f46bc68ce8ebb --- /dev/null +++ "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/trace-cmd.md" @@ -0,0 +1,44 @@ +trace-cmd +问题:[ 111s] trace-hooks.c:135:5: error: call to undeclared function 'warning'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] +[ 111s] 135 | warning("unknown flag %c\n", flags[i]); +[ 111s] | ^ +[ 111s] trace-hooks.c:152:2: error: call to undeclared function 'warning'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] +[ 111s] 152 | warning("Invalid hook format '%s'", arg); +[ 111s] | ^ +[ 111s] 2 errors generated. + +即调用了未声明的函数warning + +尝试在这个文件里加入相关定义后,别的文件又出现了同样的问题 +依次加上之后 + +[ 129s] clang: error: linker command failed with exit code 1 (use -v to see invocation) +[ 129s] make[1]: *** [Makefile:69: /home/abuild/rpmbuild/BUILD/trace-cmd-v2.9.2/tracecmd/trace-cmd] Error 1 +[ 129s] make: *** [Makefile:371: trace-cmd] Error 2 +[ 129s] error: Bad exit status from /var/tmp/rpm-tmp.FmJHHe (%build) +[ 129s] +[ 129s] RPM build warnings: +[ 129s] line 20: It's not recommended to have unversioned Obsoletes: Obsoletes: kernelshark +[ 129s] +[ 129s] RPM build errors: +[ 129s] Bad exit status from /var/tmp/rpm-tmp.FmJHHe (%build) + +即不同的编译单元中存在重复定义的符号 + +经过观察发现所有这些文件都导入了头文件event.util.h +event.util.h里面也有warning函数的定义,但是没有具体内容 +于是我尝试在warning函数里加入具体内容,结果出现了一开始的问题,即调用了未声明的函数warning,这可能意味着虽然形式上导入了头文件event.util.h,但是实际上并没有真正导入,不清楚是什么原因 + +void warning(const char* fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + fprintf(stderr, " "); + vfprintf(stderr, fmt, ap); + va_end(ap); + + fprintf(stderr, "\n"); +} + +后来在上述包里只加void warning(const char* fmt, ...)声明,不加内容,即可通过 \ No newline at end of file diff --git "a/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/vdo.md" "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/vdo.md" new file mode 100644 index 0000000000000000000000000000000000000000..0c6bc68fbd039c9410173748987822da0729a4b0 --- /dev/null +++ "b/\351\227\256\351\242\230\344\277\256\346\224\271\346\226\207\346\241\243/vdo.md" @@ -0,0 +1,35 @@ +vdo +[ 77s] error: unknown warning option '-Wlogical-op'; did you mean '-Wlong-long'? [-Werror,-Wunknown-warning-option] +[ 77s] make[2]: *** [Makefile:137: murmurhash3.o] Error 1 +[ 77s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/vdo-8.2.2.2/utils/uds' +[ 77s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/vdo-8.2.2.2/utils/uds' +[ 77s] clang -O2 -g -grecord-gcc-switches -pipe -fstack-protector-strong -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/generic-hardened-clang.cfg -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -g -O3 -fno-omit-frame-pointer -Wall -Wcast-align -Werror -Wextra -Winit-self -Wlogical-op -Wmissing-include-dirs -Wpointer-arith -Wredundant-decls -Wunused -Wwrite-strings -DCURRENT_VERSION='"8.2.2.2"' -I. -std=gnu99 -pedantic -Wbad-function-cast -Wcast-qual -Wfloat-equal -Wformat=2 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wswitch-default -c -MD -MF .deps/buffer.d.new -MP -MT buffer.o buffer.c -o buffer.o + +1.makefile5,6 +-'-Wlogical-op'(+'-Wlong-long'); + +2.murmu.c 66行 +- ++ +const uint8_t *data_ptr = data; +uint64_t value = 0; +for (int i = 0; i < 8; i++) { + value <<= 8; + value |= data_ptr[i]; +} +const uint64_t* blocks = &value; + +3.buffered-writer.c +122:chunk = (len < space_remaining_in_write_buffer(writer)? len : space_remaining_in_write_buffer(writer)); +147:chunk = (len < space_remaining_in_write_buffer(writer)? len : space_remaining_in_write_buffer(writer)); + +4.buffered-reader.c +161 +205:chunk = (length < bytes_remaining_in_read_buffer(reader)? length : bytes_remaining_in_read_buffer(reader)); + +5.spec的%build ++ +%if "%toolchain" == "clang" + CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-but-set-variable" +%endif +不产生作用,怀疑缺少configure