ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
69750
|
Tue Feb 27 16:55:39 2024 |
| Laurent Jean-Rigaud | lollspam@free.fr | Question | Linux | Other | Latest version | Re: no availability of el8 and el9 rpm | Elogd for windows has an option -install which normally does it. Is it working on last Windows version (or the one enclosed in elog:Forum/69664) ?
If Yes, a simple install-as-a-service.bat can be added to archive :-)
.
Laurent
Stefan Ritt wrote: |
Laurent Jean-Rigaud wrote: |
For Windows target, It's supported in Bitbucket but only with private agent :-(
So I tried to build using docker hub MSVC image (abrarov/msvc-2019) but pipeline fails to retrieve the image. Maybe I need to swipe on alternative images, or these images with MS software are unaccepted from Atlassian...
Also, I tried to crosscompiling ELOG Win32 from Linux with g++-mingw-w64-x86-64, but Makefile/sources need to be patched to manage this 'platform'... For the moment, it fails. :-(
Next solution : use Wine in Debian image to build Elog with mingwin as I know that it works (under Windows :-)). Will be tested after all...
|
For Windows it's more than just getting the .exe. Users want an installer. I used the Nullsoft Scriptable Installer (NSI), but I have no clue if this still works today. But there is still the elog.nsi script in the repository. Next, users want elogd as a service running in the background as a "service". I'm pretty sure the old way of doing that has changed and one would at least have to test this. Unfortunatley I switched to MacOSX about ten years ago (actually most of ELOG has been developed under Windows, but these days are gone), so I'm kind of illiterate in the Windows world now and don't have any time to change that.
Stefan
|
|
69749
|
Tue Feb 27 16:00:43 2024 |
| scott | shiva.ps@stfc.ac.uk | Question | Linux | 3.1.3 | LDAP over password file | Hi Team,
Current configuration
=================
OS: Ubuntu 22.04.4 LTS
ELOG version: elog/jammy,now 3.1.3-1-1build2 amd64 [installed]
Installation method: apt install elog
Configuration file: /etc/elogd.cfg
LOGBOOKDIR= /var/lib/elog/logbooks}
RESOURCEDIR= /usr/share/elog
I had an ELOG server set up in the Windows server which is authenticated using a Password file. Recently, I have migrated the ELOG server to the Ubuntu server. I installed ELOG from the Ubuntu repository (apt install elog) and copied over the logbook and configuration file from the windows server to the new Ubuntu server. In the server, the configuration file was set to /etc/elog.conf by default. I have modified the init file and set the configuration file to /etc/elogd.cfg (this conf file is copied from the Windows server) which includes all the settings. After moving to the Ubuntu server I would like to authenticate users using the password file and LDAP. Could someone help me how to configure LDAP in my installation style?
The global configuration that is found on my installation is as follows:
###################################
; Global settings
Password file = elog.pwd
Self register = 1
Admin user = a, b,c, d, e, Iafdsel
Suppress Email to users = 1
SMTP host = example.com
Time format = %Y-%m-%dT%H:%M:%S
Date format = %Y-%m-%d
Restrict edit time = 2
Restrict edit = 1
Allow HTML = 1
Max content length = 209715200
Save drafts = 0
###################################
Should I add the below modification (by editing the necessary fields) to the current configuration? Will that make the LDAP and normal password file work?
############################
- Enable LDAP authentication in the
Makefile by setting USE_LDAP = 1 (I am not sure if I need to do this in my installation style. If yes, how do i do this?)
Authentication = LDAP
LDAP server = ldap://example.org:389
LDAP userbase = ou=People;dc=example,dc=org
LDAP login attribute = uid
LDAP register = 1
############################
Can someone guide me on what changes I need to make for this?
Many Thanks,
Scott |
69748
|
Tue Feb 27 07:35:15 2024 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | Other | Latest version | Re: no availability of el8 and el9 rpm |
Laurent Jean-Rigaud wrote: |
For Windows target, It's supported in Bitbucket but only with private agent :-(
So I tried to build using docker hub MSVC image (abrarov/msvc-2019) but pipeline fails to retrieve the image. Maybe I need to swipe on alternative images, or these images with MS software are unaccepted from Atlassian...
Also, I tried to crosscompiling ELOG Win32 from Linux with g++-mingw-w64-x86-64, but Makefile/sources need to be patched to manage this 'platform'... For the moment, it fails. :-(
Next solution : use Wine in Debian image to build Elog with mingwin as I know that it works (under Windows :-)). Will be tested after all...
|
For Windows it's more than just getting the .exe. Users want an installer. I used the Nullsoft Scriptable Installer (NSI), but I have no clue if this still works today. But there is still the elog.nsi script in the repository. Next, users want elogd as a service running in the background as a "service". I'm pretty sure the old way of doing that has changed and one would at least have to test this. Unfortunatley I switched to MacOSX about ten years ago (actually most of ELOG has been developed under Windows, but these days are gone), so I'm kind of illiterate in the Windows world now and don't have any time to change that.
Stefan
|
69747
|
Tue Feb 27 06:59:06 2024 |
| Antonio Bulgheroni | antonio.bulgheroni@gmail.com | Question | Linux | Other | Latest version | Re: no availability of el8 and el9 rpm | Many thanks for all your efforts!
Laurent Jean-Rigaud wrote: |
Hi Stefan,
Nice to have up to date RPMs.
For .DEB, I contact the Ubuntu maintainer for its build script, and cool, he replied that he's searching for it. That's could help me to generate the deb more rapidly...
For Windows target, It's supported in Bitbucket but only with private agent :-(
So I tried to build using docker hub MSVC image (abrarov/msvc-2019) but pipeline fails to retrieve the image. Maybe I need to swipe on alternative images, or these images with MS software are unaccepted from Atlassian...
Also, I tried to crosscompiling ELOG Win32 from Linux with g++-mingw-w64-x86-64, but Makefile/sources need to be patched to manage this 'platform'... For the moment, it fails. :-(
Next solution : use Wine in Debian image to build Elog with mingwin as I know that it works (under Windows :-)). Will be tested after all...
.
Laurent
Stefan Ritt wrote: |
Many thanks for your files and instructions. I integrated this into the official elog pipeline, so now the RPMs can be downloaded from https://elog.psi.ch/elog/download.html and they will be updated automatically after each commit. If you succeed with any Debian/Ubunto I'm happy to add that. What's missing now is an easy way to compile for Windows (which I don't have anymore).
Stefan
|
|
|
69746
|
Mon Feb 26 22:23:05 2024 |
| Laurent Jean-Rigaud | lollspam@free.fr | Question | Linux | Other | Latest version | Re: no availability of el8 and el9 rpm | Hi Stefan,
Nice to have up to date RPMs.
For .DEB, I contact the Ubuntu maintainer for its build script, and cool, he replied that he's searching for it. That's could help me to generate the deb more rapidly...
For Windows target, It's supported in Bitbucket but only with private agent :-(
So I tried to build using docker hub MSVC image (abrarov/msvc-2019) but pipeline fails to retrieve the image. Maybe I need to swipe on alternative images, or these images with MS software are unaccepted from Atlassian...
Also, I tried to crosscompiling ELOG Win32 from Linux with g++-mingw-w64-x86-64, but Makefile/sources need to be patched to manage this 'platform'... For the moment, it fails. :-(
Next solution : use Wine in Debian image to build Elog with mingwin as I know that it works (under Windows :-)). Will be tested after all...
.
Laurent
Stefan Ritt wrote: |
Many thanks for your files and instructions. I integrated this into the official elog pipeline, so now the RPMs can be downloaded from https://elog.psi.ch/elog/download.html and they will be updated automatically after each commit. If you succeed with any Debian/Ubunto I'm happy to add that. What's missing now is an easy way to compile for Windows (which I don't have anymore).
Stefan
|
|
69745
|
Mon Feb 26 21:18:23 2024 |
| Antonio Bulgheroni | antonio.bulgheroni@gmail.com | Question | Linux | Other | Latest version | Re: no availability of el8 and el9 rpm | +1 for a Windows pipeline!
Stefan Ritt wrote: |
Many thanks for your files and instructions. I integrated this into the official elog pipeline, so now the RPMs can be downloaded from https://elog.psi.ch/elog/download.html and they will be updated automatically after each commit. If you succeed with any Debian/Ubunto I'm happy to add that. What's missing now is an easy way to compile for Windows (which I don't have anymore).
Stefan
|
|
69744
|
Mon Feb 26 17:39:56 2024 |
| Stefan Ritt | Mstefan.ritt@psi.ch | Question | Linux | Other | Latest version | Re: no availability of el8 and el9 rpm | Many thanks for your files and instructions. I integrated this into the official elog pipeline, so now the RPMs can be downloaded from https://elog.psi.ch/elog/download.html and they will be updated automatically after each commit. If you succeed with any Debian/Ubunto I'm happy to add that. What's missing now is an easy way to compile for Windows (which I don't have anymore).
Stefan |
69743
|
Fri Feb 23 18:00:41 2024 |
| Laurent Jean-Rigaud | lollspam@free.fr | Question | Linux | Other | Latest version | Re: no availability of el8 and el9 rpm | Hi Stefan,
> As you saw I use the bitbucket pipeline for CI/CD. The current bitbucket-pipelines.yml is pretty simple (see attachment). If you make me one which does the rpmbuild automatically, I'm more than happy to upload and use it. The downside there is that it only works for so long. As you saw at the
> error above, the pipeline worked a few years ago when I installed it. But in meantime things changed apparently and need to be fixed. ELOG is around since last century (literally!), and I'm kind of tired to fix things every once in a while. If somebody else could take over the responsibility to
> deliver the RPMs I would be more than delighted.
Good news ! I thought the bitbucket-pipelines.yml was automatically added when importing the repo :-P
Btw, i try to update it as enclosed :
- first step : build, install, start and test Web connection
- build on ELx in // with artifacts
- on centos7
- on centos8
- on centos-stream-9
- automatic deployment on ... where you want. You can push to your website the files by sftp/scp using dedicated account/key using secrets in bitbuckket...
Manually, the artifacts (rpm files) are also available from website in pipeline's steps, Artifacts tab and download button.
NB : The ELOG version is statically set in pipeline script (3.1.5) so this script need to be updated with git one by bitbuecket vars or script command to retrieve it from src.
One more thing : the elog.spec.template must be patched to build last ELOG source on EL7. Without, an error occurs on nullptr usage and C++ must be set to C11 rules... See enclosed elog-EL7_c11_patch.diff .
Now, the Debian/Ubuntu PKGs generation have to be added. Need google as I do not do that for 20 years :-P
Bye
Laurent
|
Attachment 1: elog-EL7_c11_patch.diff
|
From 57fb0be0c1b6e7e77df57499effc22784edeb898 Mon Sep 17 00:00:00 2001
From: Laurent Jean-Rigaud
Date: Fri, 23 Feb 2024 16:50:21 +0100
Subject: [PATCH] fix C11 error on EL7
---
elog.spec.template | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/elog.spec.template b/elog.spec.template
index 0e7f8abf..a30dd67a 100644
--- a/elog.spec.template
+++ b/elog.spec.template
@@ -110,7 +110,11 @@ each weblog can be totally different from the rest.
-g elog -M -r elog 2>/dev/null || :
%build
-make %{?_with_ssl} %{?_with_pam} %{?_with_ldap} %{?_with_krb5} CFLAGS="$RPM_OPT_FLAGS -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml"
+%if 0%{?rhel} == 7
+ make %{?_with_ssl} %{?_with_pam} %{?_with_ldap} %{?_with_krb5} CFLAGS="$RPM_OPT_FLAGS -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -std=c++11"
+%else
+ make %{?_with_ssl} %{?_with_pam} %{?_with_ldap} %{?_with_krb5} CFLAGS="$RPM_OPT_FLAGS -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml"
+%endif
sed "s#\@PREFIX\@#%{prefix}#g" elogd.init_template > elogd.init
%install
--
2.41.0
|
Attachment 4: bitbucket-pipelines.yml
|
# ELOG Application
# This template allows you to validate your C++ application.
# The workflow allows running tests and code linting on the default branch.
image: gcc:latest
pipelines:
default:
- step:
name: Build run and test
image: gcc:latest
deployment: test
script:
# Execute your C++ application after compilation to check success
- apt-get -qq update && apt-get -y --force-yes -qq install cmake wget lsof
- git submodule update --init
# Add elog user
- groupadd -r elog
- useradd -d / -s /bin/false -g elog -M -r elog
# Build elog
- mkdir build; cd build
- cmake ..
- make
# Install in default /usr/local/elog
- echo "install in test environment"
- make install
# Start elogd
- echo "Start ELOG"
- /usr/local/sbin/elogd -v 3 -c /usr/local/elog/elogd.cfg 2>&1 &
- sleep 5
- if [ -f /var/run/elogd.pid ]; then cat /var/run/elogd.pid ; fi
# Check open files
- lsof -p $(cat /var/run/elogd.pid)
# Test Web page
- echo "test web"
- sleep 3
- wget http://localhost:8080 && true || false
- parallel:
steps:
- step:
name: Build on EL7
image: dokken/centos-7
# trigger: manual # Uncomment to make this a manual deployment.
script:
- echo "Deploying to test environment"
- yum -y update && yum -y install rpm-build gcc gcc-c++ git openssl-devel krb5-devel pam-devel openldap-devel csh
- git submodule update --init
# git clone https://bitbucket.org/ritt/elog --recursive
- ./buildrpm 3.1.5 $(date +%Y%m%d) -krb5 -ldap -pam -ssl
- mkdir RPMS
- find ~/rpmbuild/RPMS/ -name "*.rpm" -exec mv {} RPMS \;
- ls -l RPMS
artifacts: # defining the artifacts to be passed to each future step.
download: false # do not download artifacts in this step
paths:
- RPMS/*.rpm
- step:
name: Build on EL8
image: dokken/centos-8
# trigger: manual # Uncomment to make this a manual deployment.
script:
- echo "Deploying to test environment"
- yum -y update && yum -y install rpm-build gcc gcc-c++ git openssl-devel krb5-devel pam-devel openldap-devel csh
- git submodule update --init
# git clone https://bitbucket.org/ritt/elog --recursive
- ./buildrpm 3.1.5 $(date +%Y%m%d) -krb5 -ldap -pam -ssl
- mkdir RPMS
- find ~/rpmbuild/RPMS/ -name "*.rpm" -exec mv {} RPMS \;
- ls -l RPMS
artifacts: # defining the artifacts to be passed to each future step.
download: false # do not download artifacts in this step
paths:
- RPMS/*.rpm
- step:
name: Build on EL9
image: dokken/centos-stream-9
# trigger: manual # Uncomment to make this a manual deployment.
script:
- echo "Deploying to test environment"
- yum -y update && yum -y install rpm-build gcc gcc-c++ git openssl-devel krb5-devel pam-devel openldap-devel csh
- git submodule update --init
# git clone https://bitbucket.org/ritt/elog --recursive
- ./buildrpm 3.1.5 $(date +%Y%m%d) -krb5 -ldap -pam -ssl
- mkdir RPMS
- find ~/rpmbuild/RPMS/ -name "*.rpm" -exec mv {} RPMS \;
- ls -l RPMS
artifacts: # defining the artifacts to be passed to each future step.
download: false # do not download artifacts in this step
paths:
- RPMS/*.rpm
- step: # non-parallel step
name: Deployement
deployment: staging
script:
- echo "Deliver results"
- ls -l RPMS
|
|