Skip to content

Commit

Permalink
ALL: Remove libmicrohttpd support and sign all rpms
Browse files Browse the repository at this point in the history
  • Loading branch information
esindril committed Nov 27, 2024
1 parent f4f6918 commit 79e9667
Show file tree
Hide file tree
Showing 26 changed files with 29 additions and 783 deletions.
36 changes: 9 additions & 27 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ clone_docker:
fi
- rpmbuild --rebuild --with server --with eos_grpc_gateway --define "_rpmdir build/RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" build/SRPMS/* | (ts 2> dev/null || true; tee)
- ccache -s
- if [[ -n "$CI_COMMIT_TAG" ]]; then gpg2 --import $STCI_REPO_KEY; printf "" | setsid rpmsign --define='%_gpg_name [email protected]' --define='%_signature gpg' --addsign build/RPMS/*.rpm; fi
- if [[ -n "$CI_COMMIT_TAG" ]]; then gpg2 --batch --import $STCI_REPO_KEY; printf "" | setsid rpmsign --define='%_gpg_name [email protected]' --define='%_signature gpg' --addsign build/RPMS/*.rpm; fi
- mkdir ${BUILD_NAME}_artifacts; cp -rv build/*RPMS/ build/eos-*.tar.gz ${BUILD_NAME}_artifacts
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
Expand Down Expand Up @@ -246,7 +246,7 @@ rh-9:
- if [[ -n "$CI_COMMIT_TAG" ]]; then export CCACHE_DISABLE=1; else source gitlab-ci/setup_ccache_fc.sh; fi
- rpmbuild --rebuild --with server --define "_rpmdir build/RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" build/SRPMS/*
- ccache -s
- if [[ -n "$CI_COMMIT_TAG" ]]; then gpg2 --import $STCI_REPO_KEY; printf "" | setsid rpmsign --define='%_gpg_name [email protected]' --define='%_signature gpg' --addsign build/RPMS/*.rpm; fi
- if [[ -n "$CI_COMMIT_TAG" ]]; then gpg2 --batch --import $STCI_REPO_KEY; printf "" | setsid rpmsign --define='%_gpg_name [email protected]' --define='%_signature gpg' --addsign build/RPMS/*.rpm; fi
- mkdir ${BUILD_NAME}_artifacts; cp -R build/SRPMS build/RPMS ${BUILD_NAME}_artifacts
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
Expand Down Expand Up @@ -309,16 +309,18 @@ build_fedora_rawhide:
fi
- |
if [[ ${PKG_MGR} == "yum" ]]; then
${PKG_MGR}-builddep --nogpgcheck --setopt="cern*.exclude=xrootd*" -y build/SRPMS/*;
${PKG_MGR}-builddep --nogpgcheck --setopt="cern*.exclude=xrootd*" -y build/SRPMS/*
else
${PKG_MGR} install -y dnf-plugins-core;
${PKG_MGR} builddep --nogpgcheck --setopt="cern*.exclude=xrootd*" -y build/SRPMS/*;
${PKG_MGR} install -y dnf-plugins-core
${PKG_MGR} builddep --nogpgcheck --setopt="cern*.exclude=xrootd*" -y build/SRPMS/*
fi
- if [[ -n "$CI_COMMIT_TAG" ]]; then export CCACHE_DISABLE=1; else source gitlab-ci/setup_ccache.sh; fi
- rpmbuild --rebuild ${RPMBUILD_OPTIONS} --define "_rpmdir build/RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" build/SRPMS/* | ts
- ccache -s
- if [[ -n "$CI_COMMIT_TAG" ]]; then gpg --import $STCI_REPO_KEY; printf "" | setsid rpmsign --define='%_gpg_name [email protected]' --define='%_signature gpg' --addsign build/RPMS/*.rpm; fi
- mkdir ${BUILD_NAME}_artifacts; cp -R build/SRPMS/ build/RPMS/ ${BUILD_NAME}_artifacts
- gpg --batch --import $STCI_REPO_KEY; printf "" |
setsid rpmsign --define='%_gpg_name [email protected]' --define='%_signature gpg' --addsign build/RPMS/*.rpm
- mkdir ${BUILD_NAME}_artifacts
- cp -R build/SRPMS/ build/RPMS/ ${BUILD_NAME}_artifacts
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
Expand Down Expand Up @@ -1157,26 +1159,6 @@ eos_apmon_el-9:
extends: .build-apmon-template



eos_microhttpd_cc7:
stage: build:manual
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y gcc-c++ make rpm-build which git sssd-client sudo createrepo
- cd microhttpd
- ./makesrpm.sh
- yum-builddep --nogpgcheck -y *.src.rpm
- mkdir RPMS
- rpmbuild --rebuild --define "_rpmdir RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" *.src.rpm
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${CODENAME}-depend/el-7/x86_64
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f RPMS/*.rpm $STORAGE_PATH
- sudo -u stci -H createrepo --update -q $STORAGE_PATH
tags:
- docker_node
when: manual


eos_docs:
stage: build:manual
image: gitlab-registry.cern.ch/linuxsupport/alma8-base
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ set(CPACK_PACKAGE_RELEASE "${RELEASE}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}")
set(CPACK_SOURCE_IGNORE_FILES
"${CMAKE_CURRENT_BINARY_DIR};/ApMon/;/git/;/gitlab-ci/;/ccache/;/xrootd-dsi/;/nginx/;/dsi/;\
/microhttpd/;/grpc/eos-grpc.spec;/.deps/;~$;'.'o$;/lib/;/.git/;eos.spec.in;elrepopackage.spec;.tar.gz$;\
;/grpc/eos-grpc.spec;/.deps/;~$;'.'o$;/lib/;/.git/;eos.spec.in;elrepopackage.spec;.tar.gz$;\
.tar.bz2$;${CPACK_SOURCE_IGNORE_FILES};")

configure_file(
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ yum install -y git gcc cmake cmake3 readline readline-devel fuse fuse-devel \
leveldb leveldb-devel binutils-devel zlib zlib-devel zlib-static \
bzip2 bzip2-devel libattr libattr-devel libuuid libuuid-devel \
xfsprogs xfsprogs-devel sparsehash-devel e2fsprogs e2fsprogs-devel \
libmicrohttpd libmicrohttpd-devel openssl openssl-devel openssl-static \
eos-folly eos-rocksdb ncurses ncurses-devel ncurses-static protobuf3-devel \
cppunit-devel openldap-devel hiredis-devel zeromq-devel jsoncpp-devel \
xrootd xrootd-server-devel xrootd-client-devel xrootd-private-devel \
cppzmq-devel libcurl-devel libevent-devel jemalloc jemalloc-devel
openssl openssl-devel openssl-static eos-folly eos-rocksdb ncurses \
ncurses-devel ncurses-static protobuf3-devel openldap-devel \
hiredis-devel zeromq-devel jsoncpp-devel xrootd xrootd-server-devel \
xrootd-client-devel xrootd-private-devel cppzmq-devel libcurl-devel \
libevent-devel jemalloc jemalloc-devel
```

## Build
Expand Down
2 changes: 0 additions & 2 deletions cmake/EosFindLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ if(NOT PACKAGEONLY)
find_package(RocksDB REQUIRED)
find_package(jemalloc)
find_package(EosGrpcGateway)
find_package(libmicrohttpd)
find_package(Sphinx)
find_package(fuse3)
find_package(isal_crypto)
Expand Down Expand Up @@ -147,7 +146,6 @@ else()
add_library(GRPC::grpc INTERFACE IMPORTED)
add_library(GRPC::grpc++ INTERFACE IMPORTED)
add_library(GRPC::grpc++_reflection INTERFACE IMPORTED)
add_library(LIBMICROHTTPD::LIBMICROHTTPD INTERFACE IMPORTED)
add_library(CURL::libcurl INTERFACE IMPORTED)
add_library(ATOMIC::ATOMIC INTERFACE IMPORTED)
add_library(LIBEVENT::LIBEVENT INTERFACE IMPORTED)
Expand Down
47 changes: 0 additions & 47 deletions cmake/Findlibmicrohttpd.cmake

This file was deleted.

3 changes: 1 addition & 2 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ if (Linux)
target_link_libraries(EosCommonServer-Objects PUBLIC
qclient
XROOTD::UTILS
PROTOBUF::PROTOBUF
LIBMICROHTTPD::LIBMICROHTTPD)
PROTOBUF::PROTOBUF)

target_compile_definitions(EosCommonServer-Objects PUBLIC
-DSQLITE_NO_SYNC=1)
Expand Down
9 changes: 0 additions & 9 deletions doc/citrine/develop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ Then, run:
Important troubleshooting steps
--------------------------------

During the last command, you may encounter error such as *Error: No Package found for libmicrohttpd-devel >= 0.9.38*, this can be resolved by:

.. code-block:: bash
yum install gnutls
yum install libmicrohttpd-devel --disablerepo="*" --enablerepo=eos-citrine-dep
yum-builddep --nogpgcheck --setopt="cern*.exclude=xrootd*" -y SRPMS/*
If you do not succeed enabling devtoolset-8 it might also be that you are using zsh which is incompatible with `scl-utils <https://stackoverflow.com/questions/62958800/enable-devtoolset-8-for-zsh-on-centos-7>`_.

Make sure you have compatible xrootd version installed (:code:`rpm -qa | grep xroot`), currently the above will install you version 5.0.3 which is not yet compatible with EOS <= 4.8.35 (Dec/Jan 2020). Look at the latest version of xrootd in the [eos-citrine-dep] repository (currently 4.12.6) or ask the developers if in doubt.
Expand Down
2 changes: 0 additions & 2 deletions doc/citrine/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ Protocols and Clients

The native protocol is the **xrootd** protocol, which provides additional functionalities like vector reads, third party copy transfers etc.

A second embedded protocol is **http/webdav** currently implemented using `libmicrohttpd`.

EOS can be used like a filesystem using FUSE clients. There are two implementations available:

* **eosd** - available for BERYL and CITRINE - limited POSIX conformity
Expand Down
1 change: 0 additions & 1 deletion doc/citrine/quickstart/ns_quarkdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Install the **QuarkDB** and **EOS** packages:
.. code-block:: bash
yum install -y quarkdb quarkdb-debuginfo redis
yum install -y --nogpgcheck --disablerepo="*" --enablerepo="storage*" libmicrohttpd*
yum install -y --nogpgcheck --disablerepo="cern*" eos-server eos-client eos-rocksdb eos-testkeytab
Expand Down
9 changes: 0 additions & 9 deletions doc/diopside/manual/develop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,6 @@ Then, run:
Important troubleshooting steps
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

During the last command, you may encounter error such as *Error: No Package found for libmicrohttpd-devel >= 0.9.38*, this can be resolved by:

.. code-block:: bash
yum install gnutls
yum install libmicrohttpd-devel --disablerepo="*" --enablerepo=eos-citrine-dep
yum-builddep --nogpgcheck --setopt="cern*.exclude=xrootd*" -y SRPMS/*
If you do not succeed enabling devtoolset-8 it might also be that you are using zsh which is incompatible with `scl-utils <https://stackoverflow.com/questions/62958800/enable-devtoolset-8-for-zsh-on-centos-7>`_.

Make sure you have compatible xrootd version installed (:code:`rpm -qa | grep xroot`), currently the above will install you version 5.0.3 which is not yet compatible with EOS <= 4.8.35 (Dec/Jan 2020). Look at the latest version of xrootd in the [eos-citrine-dep] repository (currently 4.12.6) or ask the developers if in doubt.
Expand Down
2 changes: 0 additions & 2 deletions eos.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ BuildRequires: openssl-static, ncurses-static
BuildRequires: eos-rocksdb = %{eos_rocksdb_version}
BuildRequires: openldap-devel
BuildRequires: e2fsprogs-devel
BuildRequires: eos-libmicrohttpd, eos-libmicrohttpd-devel >= 0.9.38
%endif

BuildRequires: eos-grpc = %{eos_grpc_version}
Expand Down Expand Up @@ -352,7 +351,6 @@ Requires: eos-grpc-gateway
%endif

Requires: eos-client = @CPACK_PACKAGE_VERSION@
Requires: eos-libmicrohttpd >= 0.9.38
Requires: acl
Requires: gdb
Requires: jemalloc, jemalloc-devel
Expand Down
16 changes: 2 additions & 14 deletions fst/XrdFstOfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ XrdFstOfs::xrdfstofs_stacktrace(int sig)
// Print out all the frames to stderr
fprintf(stderr, "error: received signal %d:\n", sig);
backtrace_symbols_fd(array, size, 2);
eos::common::StackTrace::GdbTrace(0 , getpid(), "thread apply all bt");
eos::common::StackTrace::GdbTrace(0, getpid(), "thread apply all bt");

if (getenv("EOS_CORE_DUMP")) {
eos::common::StackTrace::GdbTrace(0 , getpid(), "generate-core-file");
eos::common::StackTrace::GdbTrace(0, getpid(), "generate-core-file");
}

// Now we put back the initial handler and send the signal again
Expand Down Expand Up @@ -942,18 +942,6 @@ XrdFstOfs::Configure(XrdSysError& Eroute, XrdOucEnv* envP)
mHttpd.reset(new eos::fst::HttpServer(mHttpdPort));

if (mHttpd) {
const char* ptr = getenv("EOS_FST_ENABLE_LIBMICROHTTPD");

if (ptr && (strncmp(ptr, "1", 1) == 0)) {
if (!mHttpd->Start()) {
eos_static_warning("%s", "msg=\"failed to start libmicrohttpd\"");
} else {
eos_static_notice("%s", "msg=\"successfully started libmicrohttpd\"");
}
} else {
eos_static_notice("%s", "msg=\"libmicrohttpd is disabled\"");
}
} else {
eos_static_crit("%s", "msg=\"failed to allocate HttpServer object\"");
NoGo = 1;
}
Expand Down
1 change: 0 additions & 1 deletion mgm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ target_link_libraries(XrdEosMgm-Objects PUBLIC
RestAnnot-Objects
EosCommonServer
EosGrpcGateway::EosGrpcGateway
LIBMICROHTTPD::LIBMICROHTTPD
GOOGLE::SPARSEHASH
JSONCPP::JSONCPP
XROOTD::PRIVATE
Expand Down
26 changes: 7 additions & 19 deletions mgm/XrdMgmOfsConfigure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -625,25 +625,25 @@ XrdMgmOfs::Configure(XrdSysError& Eroute)
}
}

if (!strcmp("qclient_flusher_type",var)) {
if (!strcmp("qclient_flusher_type", var)) {
if (!(val = Config.GetWord())) {
Eroute.Emsg("Config", "argument for qclient_flusher_type is invalid");
NoGo = 1;
} else {
mQClientFlusherType = val;

Eroute.Say("=====> mgmofs.qclient_flusher_type : ", mQClientFlusherType.c_str());
Eroute.Say("=====> mgmofs.qclient_flusher_type : ",
mQClientFlusherType.c_str());
}
}

if (!strcmp("qclient_rocksdb_options",var)) {
if (!strcmp("qclient_rocksdb_options", var)) {
if (!(val = Config.GetWord())) {
Eroute.Emsg("Config", "argument for qclient_rocksdb_options is invalid");
NoGo = 1;
} else {
mQClientRocksDBOptions = val;

Eroute.Say("=====> mgmofs.qclient_rocksdb_options : ", mQClientRocksDBOptions.c_str());
Eroute.Say("=====> mgmofs.qclient_rocksdb_options : ",
mQClientRocksDBOptions.c_str());
}
}

Expand Down Expand Up @@ -2074,19 +2074,7 @@ XrdMgmOfs::Configure(XrdSysError& Eroute)
eos_static_crit("error starting the shared object change notifier");
}

if (mHttpd) {
const char* ptr = getenv("EOS_MGM_ENABLE_LIBMICROHTTPD");

if (ptr && (strncmp(ptr, "1", 1) == 0)) {
if (!mHttpd->Start()) {
eos_static_warning("%s", "msg=\"failed to start libmicrohttpd\"");
} else {
eos_static_notice("%s", "msg=\"successfully started libmicrohttpd\"");
}
} else {
eos_static_notice("%s", "msg=\"libmicrohttpd is disabled\"");
}
} else {
if (!mHttpd) {
eos_static_crit("%s", "msg=\"failed to allocate HttpServer object\"");
NoGo = 1;
}
Expand Down
Loading

0 comments on commit 79e9667

Please sign in to comment.