Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New line in description #251

Closed
geekq opened this issue Aug 22, 2012 · 5 comments

Comments

@geekq
Copy link

@geekq geekq commented Aug 22, 2012

Is there a way to provide a longer package description including new lines?

Using \n seems not to work:

fpm -s dir -t rpm -n my-component -v 0.1.0.50 --description "source revision: 957f087eb3a6ec04415871e6cd7d6d9e7e3d1b50\nmore description\neven more" -C rpm-src/ .
@jordansissel

This comment has been minimized.

Copy link
Owner

@jordansissel jordansissel commented Aug 24, 2012

Hmm.. Checking on this.

@jordansissel

This comment has been minimized.

Copy link
Owner

@jordansissel jordansissel commented Aug 24, 2012

OK so, here's what works:

fpm --description "$(printf "hello\nworld\n")"

Obviously that's not super awesome. I'm totally open to supporting literal "\n" sequences and turning those into newlines.

@jordansissel

This comment has been minimized.

Copy link
Owner

@jordansissel jordansissel commented Aug 24, 2012

% bin/fpm -s dir -t rpm -n fizzle --description "fooo\nbar\nbaz\n" /etc/motd 
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.eS5uFv
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.1j0c0n
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.4tgclg
Processing files: fizzle-1.0-1.x86_64
Wrote: /tmp/package-rpm-build20120824-29961-1rxp9ff/RPMS/x86_64/fizzle-1.0-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.uqLY20
Created rpm {"path":"fizzle-1.0-1.x86_64.rpm"}


% rpm -qp fizzle-1.0-1.x86_64.rpm --qf '%{Description}'                        
fooo
bar
baz
jordansissel added a commit that referenced this issue Aug 24, 2012
@jordansissel

This comment has been minimized.

Copy link
Owner

@jordansissel jordansissel commented Aug 24, 2012

the above example is valid in cb50a18 and will show up in the next release.

@geekq

This comment has been minimized.

Copy link
Author

@geekq geekq commented Aug 25, 2012

Thanks Jordan!

The workaround works for me, even with nested variables like

fpm -s dir -t rpm -n $FULL_COMPONENT_NAME -v "$COMPONENT_VERSION.$BUILD_NUMBER" \
  --description "$(printf "Source revision: $GIT_COMMIT on branch $GIT_BRANCH\nBuilt by jenkins job $JOB_NAME\nBuild details: $BUILD_URL")" \
  -C tmp-rpm-src/ .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.